Socket Connection from CF3.5 WM6 to PC

mshire

New member
Joined
Apr 24, 2009
Messages
2
Programming Experience
10+
Hi all, having problems connecting with a client socket (PPC) to my server socket (PC, 192.168.1.81)... Here's a code snipet:

VB.NET:
_RemoteEP = New IPEndPoint("192.168.1.81", 5700)

_Socket = New Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)

_Socket.Connect(_RemoteEP)

it simply returns "No connection could be made because the target machine actively refused it" which is the same as if it wasn't connected.

I've tried using vxUtil to ping the PC but that fails aswell... its as though there is not 'normal' TCP/IP connection, when connected via ActiveSync?

Any help or pointer would be much appreciated!

Mike

PS the same code works fine (PC -> PC)
 
Update

OK, I think the connection is good (I read somewhere ping packets don't work...?) as it fires a server connection event on the PC side, so there must be some form of communication. However the PPC side still errors with a "No connection could be made because the target machine actively refused it" error message... maybe I'm doing something wrong on the server (PC) side?

It gets into this code on connection on the server side:

VB.NET:
        Private Sub ServerAccept(ByVal ar As IAsyncResult)
            Dim server As Socket = ar.AsyncState

            If _Running Then
                server.EndAccept(ar)

                _Accept_Event.Set()
            End If
        End Sub
 
Back
Top