Sockets!!

  • Thread starter Thread starter James Proctor
  • Start date Start date
J

James Proctor

Hi, im writting an application which works over a net
work and i need to be able to send other users on the
network messages from the server application. I suppose
kinda of like a p2p chat program. Does any body know of
any good examples of this is VB.net. I cant seem to find
any good ones. When ive tired i keep getting an error
saying request refused, which is a bit daft considering
its my own machines IP. Hope you can help me out. Regards

JP
 
Well the reason you are getting the error is probably because you're not
using a TCPListner to establish the connection from the client Application.
You need to have a Host application or module that will listen for incoming
connections and then can hand them off to another class to be processed and
handled. There a tons of good examples on using the TCP sockets on MSDN I
would recomend downloading the 101 samples from MSDN and taking a look at
the TCP applications there.
 
Also I might add the mistake I made when I did the sample...

If you are on a network be sure your port forwarding is set correctly. (tell
your router that say you are 155.155.1.8 you want all port 6000
communication to go to 155.155.1.8) other wise it will give you connection
refusal errors.
 
Back
Top