Single Server w/ Multiple Client (Internet Cafe Billing Program)
Dear All,
I am developing a project for my school, to build an internet cafe billing like program. Until now I've succeeded to build a single client connection to my server program.
My problem is, how to make a server that can connect/ listen to multiple client? Are there any example/ code examples for doing that?
Below is some of the server's code snipped from my program (listening part). Any help would be highly appreciated. Thank you.
PrivateSub Listening()
Dim AddrAs IPAddress =Nothing
Try
Addr = Dns.GetHostEntry("server").AddressList(0)
Dim EPAsNew IPEndPoint(Addr,CInt(12000))
ServerSocket =New Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)
ServerSocket.Bind(EP)
ServerSocket.Listen(0)
ToolStripStatusLabel1.Text ="Waiting..."
ServerWasStopped =False
ServerSocket.BeginAccept(AddressOf ServerCallBack,Nothing)
Catch ExpAs Exception
'Catch errors in bind address/port/etc
MessageBox.Show(Exp.Message &"." & vbCrLf &"Please 01.", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error)
ExitSub
EndTry
EndSub

