I have a program to send socket using CAsyncSocket. By default it is TCP, I list here some steps:
- Create connection for client and server
if (m_iType == 0)
// Client, create a default socket
// Open the connection to the server
// Server, create a socket bound to the port specified
// Listen for connection requests
- function OnAccept () to call Accept
and one OnReceive() to call Receive
iRcvd = m_sConnectSocket.Receive(p
I followed step by step in Learn Visual C++ 24 days
It runs ok now for TCP type. However all I need now is I also want the program has one more function is sending UDP packet (I added one combo box whcih contain alll packet type such as UDP, SIP...)
How can I do now? Please show me how to modify or add code for this existing program.
I searched and found alot of UDP samples but this means I must add many new classes which run indepedently with old code and this caused the program bulky.