Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

Hi all,
I have written a sample code in brew for socket programming.
At server side i have written a code to open a socket, bind,listen and accept.
Both client and server run in the same pc.
in bind i gave
rValue = ISOCKET_Bind(pMe->pISocket, AEE_INADDR_ANY , HTONS(0x200)); and it is able to bind the socket successfully.
after that im calling listen api it is also returning success.
in my accept it is always returning AEE_NET_WOULDBLOCK so i wrote a call back to the same accept function(ISOCKET_Readable(pMe->pISocket, (PFNCONNECTCB)tryAccept, (void*) pMe);
) but it is not calling this call back function it is simply going back to the simulator.

in the client side i wrote a code to open the socket and connect the socket but in connect which ip address we have to give??
I tried all the ip address i.e loopback, any and system ipaddress also.
which ever the addres i give im getting success but when i write some bytes to the server im getting the error as 528 which is nothing but
#define AEE_NET_ENOTCONN (NET_ERROR_BASE+0x10) // socket not connected.
can any one tel me how to write a client server program in brew??
both client and server are runnning in the same pc

Thanks in advance,
rajeshwari

Can you send me the code snippet to find out the cause of issue?
Thanks,
Mahesh

Can you send me the code snippet to find out the cause of issue?
Thanks,
Mahesh

Hi Mahesh,
Thanks for the reply.
I could able to implement the socket programming in brew.
Thanks and Regards,
Rajeshwari.

Hi Mahesh,
Thanks for the reply.
I could able to implement the socket programming in brew.
Thanks and Regards,
Rajeshwari.