Well to the problem. Im doing a really, REALLY simple chat client. (intending to control the mouse over ethernet). Where everything stops is when im trying to connect to the server.
On the client machine im running Vista using standard IPv6, and the Server im running XP Pro with IPv6. When launching the code below i can see from the network analyzing that it is actully sending packets and reciving to and from the server machine.
Then it gives me the most odd explenation ever.
"No connection could be made because the target machine activley refused it".
Ive tried to open up the network as mutch as possible to do a trial and error thing, but still no luck.
I dont even need to have my server app up and running. it still gives me the same message.
This is the Client code:
Expand|Select|Wrap|Line Numbers
- public void RunClient()
- {
- try
- {
- Client = new TcpClient();
- Client.Connect("192.168.1.33", 50000);
- outputStream = Client.GetStream();
- Writer = new BinaryWriter(outputStream);
- }
- catch (Exception e) { MessageBox.Show(e.ToString()); } }}
- This is the servercode:
- private void RunServer()
- {
- TcpListener listener;
- try
- {
- IPAddress local = IPAddress.Parse("127.0.0.1");
- listener = new TcpListener(local, 50000);
- listener.Start();
- while (true)
- {
- Connection = listener.AcceptSocket(); MessageBox.Show("Someone got connected."); ...
Thanks in advance for occupying your time =)