sockets - I want to send some data and image when client send request to server in c# using TCP/IP -


i new in socket programming. did simple message transfer 1 process another, want send image + data when client sends request server. able send data or image, not both of them in single request. how accomplish this?.

as mentioned in comments, in context of tcp/ip sending \ receiving process based on streaming array of bytes. can use following algorithm (it not copy-paste solution) :

  1. create custom type contains data : may string , i recommend store path string origin image.

class streamdata {string datapath {get;set;} string imagepath {get;set;} }

  1. add abstraction level class convert data (image, music) byte array , path of data convert.class streamconverter{ //some awesome method(string path)}.

and send data client. don't forget how client deserialize/encode data.


Comments

Popular posts from this blog

Load Balancing in Bluemix using custom domain and DNS SRV records -

oracle - pls-00402 alias required in select list of cursor to avoid duplicate column names -

python - Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] error -