I am trying to open a socket with a server on a specified port. Right now all I want to do is create the socket and open the connection with the server. I am new to the sockets thing and could use some help. After creating a small dialog based application with winsock support I declare:

//declared public in the dialog class

CAsyncSocket m_thesocket;

//then I call its Create method on the action of a pushbutton

if(m_thesocket.Create())
{
AfxMessageBox("Socket successfully created!");
}
else
{
AfxMessageBox("Socket creation error!");
}

//now for the connection - using a unix pop server - is this ok?

if (m_thesocket.Connect("servename.com", 25))
{
AfxMessageBox("Connection successfull!");
}
else
{
AfxMessageBox("Connection error!");
}

Right now I just want to know that the connection is made. But for some reason it is not being made. Is it possible to open a connection with a pop server on port 25 in this manner? Any help would be greatly appreciated. Thanks in advance.

--------------------
Bruce Campbell
[email protected]

-----------------
Bruce Campbell
[email protected]