FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
Java-Auction-Server/AuctionServer.java at master · Deshan555/Java-Auction-Server · GitHub
Deshan555
/
Java-Auction-Server
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
2
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
Java-Auction-Server
/
AuctionServer.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
39 lines (31 loc) · 1.03 KB
Breadcrumbs
Java-Auction-Server
/
AuctionServer.java
Copy path
File metadata and controls
39 lines (31 loc) · 1.03 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import
java
.
io
.
IOException
;
import
java
.
net
.
ServerSocket
;
import
java
.
net
.
Socket
;
/**
*
* @author Hishan Indrajith
*/
public
class
AuctionServer
{
public
static
final
int
BASE_PORT
=
2000
;
public
static
void
main
(
String
[]
args
){
//ServerController controller = new ServerController();
StockDB
stockDataStruct
=
new
StockDB
();
OfferDB
offerDatastruct
=
new
OfferDB
();
ServerController
guiController
=
new
ServerController
();
Thread
guiThread
=
new
Thread
(
guiController
);
guiThread
.
start
();
AuctionServer
server
=
new
AuctionServer
();
try
{
server
.
serverLoop
();
}
catch
(
IOException
ex
) {
}
}
public
void
serverLoop
()
throws
IOException
{
ServerSocket
serverSocket
=
new
ServerSocket
(
BASE_PORT
);
while
(
true
) {
Socket
socket
=
serverSocket
.
accept
();
// if error must close the socket
Connection
newConnection
=
new
Connection
(
socket
);
newConnection
.
startThread
();
}
}
}
Back
|
FazBrowse Home
|
New Git URL