Thank you guys, it was very helpful.
reddy07
Posts
-
Conversion -
ConversionHi I am devloping an application in MFC I need to convert UCAHR pointer to Cstring and vice versa such as UCHAR *pMsg; pMsg[0] = '1'; pMsg[1] = '2'; pMsg[3] = '3'; pMsg[4] = NULL to CString and viceversa... Can anybody help.
-
Socket Help!!!Yes, tags are not working. I posted in hurry. I will take care next time when i post. Thanks David!!! Yes, I realized every time OnReceive is invoked new pSocket is created. Then, how to initialize pSocket saying it is previously connected.
-
Socket Help!!!Hi I am trying to create a server that would accept and receive message from multiple client. But i am receiving SOCKET_ERROR while my server seems to accept the multiple connection. Could anyone correct my code. Here is the code I wrote.. CMysocket m_sListenSocket; <pre>void CLocalDlg::OnAccept(void) { CMysocket *pSocket = new CMysocket; if(m_sListenSocket.Accept(*pSocket)) MessageBox("Connection Accepted"); } For receiving: <pre>void CLocalDlg::OnReceive(void) { CMysocket *pSocket = new CMysocket; char *pBuff = new char[1024]; int stlen = 1025; int iRcvd; iRcvd = pSocket->Receive(pBuff, stlen); if(iRcvd ==SOCKET_ERROR) MessageBox("Received socket error"); else MessageBox("Message Received properly"); }
-
MFC SocketThanks david, I solved it - now I could able to establish mulitple client with single server, but I am facing problem in receving messages from clients. Server couldnt receive the message that client is sending. On client side, client is sucessfully sending the message. Could you please throw some light. Binding i will look into it later once server start receving messages
-
MFC SocketHi, I am working on MFC Asynchronoussocket program, I could able to successfully send and receive messages between one to one client and server using accept, receive classes. But when i am trying to connect multiple client to server, my application crashes. And I also wonder, if I able to accept multiple client, how would I match the send and receive messages between different clients and server. Could anyone please help me out!!! Thanks Reddy
-
MFC Networking Application.Scenario: The application has 10 nodes connected in a network. each node can either act as server/client. At any given time there will be only one server and one client. My question is say for example if default server is down - then client application will poll the message to remaining nodes looking for server if not it will become server for remaining clients. So, how to poll message in a network using MFC.