c - How to send and receive an array of character pointers char *argv[] from server to client in linux socket programming -


i have char * array

 char *options[n] ; // n = 2 example .    options[0] = "how to";   options[1] = "send"; 

how send "options" server client , using 1 function call send. since prototype of send int send(int sockfd, const void *msg, int len, int flags); , receive int recv(int sockfd, void *buf, int len, int flags); not sure how cast "options" such send , receive can take place in 1 function call.

you have send actual character strings. pointers memory addresses on machine , accesable/meanaingful inside program.

even if client , server on same machine os block attempt access client programs memory.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -