> 1, wsocketServer can achieve this function? As its name implies, TWSocketerver is the component you'll use at the server side (The one waiting for connections from client). You shall use TWSocket at client side (The one which initiate the connection to the server).
> 2, need to use linemode? Its lineEnd how to set? Do not set up, wrong, how to deal with? You shall use LineMode if and only if the messages you send are ALL terminated by the same characters (One of more, default is CR LF pair). You set LineMode Boolean property to change the behavior. > 3, need to enable MulitiThreaded? You shall probably not use multithread. ICS components multitask without the need of multithread. You'll only need multithreading if you have lengthy computation or length database (or similar) access. > 4,How do WSocketServer receive data ,Is it by ClientDataAvailable? TWSocketServer by itself doesn't receive any data, it waits for client connection. When one client is connecting, TWSocketServer instanciate a TWSocket to handle that particular client communication. Have a look at OverbyteIcsSrvTcp.dpr, OverbyteIcsTcpSrv.dpr or OverbyteIcsTnSrv.dpr projects if you build a GUI server, or OverbyteIcsSrvTcp.dpr project if you build a service for the server. Have a look at OverbyteIcsClient7.dpr project to start your client prject. Seasons greetings, -- francois.pie...@overbyte.be The author of the freeware multi-tier middleware MidWare The author of the freeware Internet Component Suite (ICS) http://www.overbyte.be -----Message d'origine----- De : TWSocket [mailto:twsocket-boun...@lists.elists.org] De la part de sxbug Envoyé : mercredi 28 décembre 2016 08:12 À : twsoc...@elists.org Objet : [twsocket] I want to receive bin string by wsocketserver Sir, thank you for your great works. I want to receive/send binary string by WSocketServer. My client is a GPRS . 1, the send string is binary data , its length maybe 10 byte, 17 byte, 24 byte, and 40byte etc. 2, the send data began as 16 hexadecimal fixed: FA 21 3, the end of the data's character is arbitrary . 4, after receiving data, do some data analysis, and write some msg to database. There are a few questions to consult ICS Component, 1, wsocketServer can achieve this function? 2, need to use linemode? Its lineEnd how to set? Do not set up, wrong, how to deal with? 3, need to enable MulitiThreaded? 4,How do WSocketServer receive data ,Is it by ClientDataAvailable? Could you pleased give me some code for this function? Thanks Sun Xiao -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be