unbind socket connection C#/python
What I have:

I have two socket client programs written in C# 

I have one socket server program (not written by me but WORKS) in python

The problem:

The first c# socket client I wrote works fine and can communicate with the python server client.  I can send data over with no issue.  However I wanted to rewrite the code to make it more object oriented so I made the second program which is the same as the first in terms of what is done.

The issue is the second one wont connect saying this:

**System.Net.Sockets.SocketException: An attempt was made to access a socket in a forbidden way by its access permissions**

I googled this and I have come to the realization that the connection from the first connection hasnt been completely unbound

when i did a netstat -a i actually saw the connection and it said TIME_WAIT at the end

the question is how do i unbind it?  Is it on the C#/client side?
FYI I have already tried closing/disconnecting/shutting down the socket and no of that worked.  I also put in this command

**connection.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, true);** 

upon instantiation of the socket connection but that did not work either

would i have to do something on the sever side to unbind the connection?

PLZ help!! THANKS
-Mike
unbind socket connection C#/python
===

What I have:

I have two socket client programs written in C# 

I have one socket server program (not written by me but WORKS) in python

The problem:

The first c# socket client I wrote works fine and can communicate with the python server client.  I can send data over with no issue.  However I wanted to rewrite the code to make it more object oriented so I made the second program which is the same as the first in terms of what is done.

The issue is the second one wont connect saying this:

**System.Net.Sockets.SocketException: An attempt was made to access a socket in a forbidden way by its access permissions**

I googled this and I have come to the realization that the connection from the first connection hasnt been completely unbound

when i did a netstat -a i actually saw the connection and it said TIME_WAIT at the end

the question is how do i unbind it?  Is it on the C#/client side?
FYI I have already tried closing/disconnecting/shutting down the socket and no of that worked.  I also put in this command

**connection.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, true);** 

upon instantiation of the socket connection but that did not work either

would i have to do something on the sever side to unbind the connection?

PLZ help!! THANKS
-Mike