9 years, 1 month ago.

How to establish server - client socket communication ?

Hi,

I am using freescale FRDM k64 platform. I want to establish a client-server socket communication between my FRDM k64 (mbed) and my windows PC PC as server running win32 server socket application and tcp client example on FRDM k64. What are the steps to be followed to achieve this?I AM NEWBIE TO MBED . Suggesstion are appreciated.

Regards Sriram

Question relating to:

Example application that connect with a TCP web server. client, example, NetworkAPI, socket, TCP

1 Answer

9 years, 1 month ago.

TCP_Client_Example assumes that a web server program is running on the server.

You use windows machine, so to install and run IIS, web server program provided by Microsoft, may be easiest way to run web server on your pc.

Modify TCP_Client_Example at following parts.

Line 20: modify "/media/uploads/donatien/hello.txt" to proper file path on your IIS.

Line 27: change "mbed.org" to machine name or IP address of your pc.

Now you can test TCP_Client_Example.

Socket (http://developer.mbed.org/handbook/Socket) explains details of port, connection, socket and so on. I recomend you to read that page for better understanding.

hi,

Thanks for the reply. I have made changes as per your comments already.Actually i am running my windows server code example on visual studio in my windows pc . I am not able to connect to socket. any help??

posted by Nilanjan D 12 Mar 2015