How to Socket Programing...
-
Client --- Unix.. Server --- windows 2000 how does recognize what a data type client send to server? ................................................................. How to Know server dataType this is Receive Data from Client ??? .................................................................. client send Data server receive data .. how to konw dataType if DataType is picture or avi file than save to the other file name and same file type if DataType is sting than order to SQL Server... "select~~
from~where" + string if DataType is XML file than save to XML file Please answer me.. i m Socket Programing at first -
Client --- Unix.. Server --- windows 2000 how does recognize what a data type client send to server? ................................................................. How to Know server dataType this is Receive Data from Client ??? .................................................................. client send Data server receive data .. how to konw dataType if DataType is picture or avi file than save to the other file name and same file type if DataType is sting than order to SQL Server... "select~~
from~where" + string if DataType is XML file than save to XML file Please answer me.. i m Socket Programing at first -
Client --- Unix.. Server --- windows 2000 how does recognize what a data type client send to server? ................................................................. How to Know server dataType this is Receive Data from Client ??? .................................................................. client send Data server receive data .. how to konw dataType if DataType is picture or avi file than save to the other file name and same file type if DataType is sting than order to SQL Server... "select~~
from~where" + string if DataType is XML file than save to XML file Please answer me.. i m Socket Programing at firstYou should search CodeProject. There is lots of examples and topics regarding socket programming. How do you know the data types? You're the one sending and receiving them, so you dictate what those structures are. If you didn't create these structures for either the client or the server, then you need to consult the documentation for the socket client or server that you're trying to talk to. As far as sending files, you just send them using a buffer (a
Byte[]
array) as is. For strings and XML, just send the character data using the proper encoding (seeSystem.Text.Encoding
for more information). You get theByte[]
array for the characters based on an agreed encoding between client and server. You can either assume a single encoding between the two, or send data (much like HTTP, SMTP/MIME, etc.) using an encoding that one dictates.-----BEGIN GEEK CODE BLOCK----- Version: 3.21 GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++ -----END GEEK CODE BLOCK-----