sockets in mfc
C / C++ / MFC
1
Posts
1
Posters
0
Views
1
Watching
-
am i using sockets correctly?
class CMySocket : public CAsyncSocket { public: CMySocket() : CAsyncSocket() {} void OnAccept() { _tprintf(_T("incoming connection\n")); } }; //and then later if( !AfxSocketInit() ) _tprintf(_T("Cannot init sockets")); CMySocket* sock = new CMySocket; if( sock->Create(1935,SOCK_STREAM,FD_READ | FD_WRITE) ) _tprintf(_T("Created!\n")); if( sock->Listen() ) _tprintf(_T("Listening!\n")); delete sock;
the thing is that listening doesn't seem to get aby results though another app connects to that port. i am sending data from my FLASH movie via XMLSocket object but no result :(