O poo, now it says that the address is in use. Heres the lowdown. The chat program is created to serv OR connect, all in one app. Now it may be a winsock problem i cant see but i dont know. I have to folders with the EXACT same form. I run one and press the host button, then run another enter in the ip "127.0.0.1" and it gives me a runtime error and says "Address in use". Its in the same code that i originaly poisted just on the 4'th line "winsock.Connect".
If one is a listening socket, and one is a client socket, then it might work. I'm not so sure that windows is going to like the idea of you trying to use 10101 for both listening and trying to connect on though. If it's the same code though, it should be just 2 programs trying to connect to the same port.... I usually get that same error when I try to have 2 server sockets (sockets that accept a connecton) on the same port and IP address.
The thing is this.... 1 winsock control needs to be a "listening" socket, and 1 needs to be a client socket. Here, read this mini-tutorial about winsock, and it will give you a better understanding. Basically, 1 socket needs to say "ok, I'm gonna listen and if you try to connect, I will accept your connection". The other socket needs to say "hey, I'm gonna try to make a connection to you". Here is the tutorial:
Another issue has arisen
Private Sub send_Click()
txtdisplay.Text = txtdisplay.Text & vbCrLf & txtsend.Text
txtsend.Text = ""
I need it so that everytime i finish a message it goes to the next line, and print on that line, name ill handle later.
Oh lol, i figured that part out >.> cant get one program to connect to itself, had to run two programs :p but that works, i just need to get it so that when im serving and then press connect it auto tuirns off the serving connection and starts the conecting connection, or vise versa.
I'm not sure I know what you mean about having the socket change over. There are only 2 kinds of socket. A Listener, and A Client, you can't have 1 socket do both. Plain and simple. You can't change in the middle, either. Once a client makes a connection to the server, the server has to remain that type of socket, and the client has to remain it's type of socket. Once you are connected, however, you can send data back and forth from the server socket to the client and vice versa.