-1

Hi i found this site and this guy tries to teach you how to make a chat program. Well i just copied his code in and... th program worked. I can send a message to the server and it sends it back just fine. But i can only send a message once. If i try to send another message i get an error and it says this "A first chance exception of type 'System.Net.Sockets.SocketException' occurred in System.dll" then it "No connection could be made because the target machine actively refused it 127.0.0.1:500"

here is the link to the tutorial and code
http://ondotnet.com/pub/a/dotnet/2003/07/07/netstreams.html

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by GeekByChoiCe
0

tcpclient.Close() <<< thats the reason
this code is made for demonstration only and closes after first receive.
You have to add some eventhandlers for client connect, receiving and so and only close the tcpclient if you really want it.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.