get() - GET_FAIL x GET_EOF

new topic     » topic index » view thread      » older message » newer message

This is a multi-part message in MIME format.

------=_NextPart_000_0012_01C0C9D4.8BF346C0
	charset="iso-8859-2"

Hi all

why
 value("{1,") gives GET_EOF, but
 value("{1") gives GET_FAIL ?

I'm writing chat program. The exchange of messages could be done with =
sequences :
client will send something like {myname,message,other_info}. The server =
will read buffer and then decide :

GET_SUCCES =3D> process message
GET_FAIL =3D> error, ignore this message, send warning to client
GET_EOF =3D> whole message not sended yet, read the buffer again

Should I use some special char after the end of sequence ?

Thanks
------------------------
Regards,
Martin Stachon

------=_NextPart_000_0012_01C0C9D4.8BF346C0
Content-Type: text/html;
	charset="iso-8859-2"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-2" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2614.3500" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3D"Arial CE" size=3D2>Hi all</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3D"Arial CE" size=3D2><FONT face=3DCourier><FONT=20
face=3D"Arial CE">why</FONT></FONT></FONT></DIV>
<DIV><FONT face=3D"Arial CE" size=3D2><FONT face=3DCourier><FONT=20
face=3D"Arial CE">&nbsp;</FONT>value("{1,") </FONT>gives <FONT=20
face=3DCourier>GET_EOF, </FONT><FONT face=3D"Arial =
CE">but</FONT></FONT></DIV>
<DIV><FONT face=3D"Arial CE" size=3D2>&nbsp;<FONT =
face=3DCourier>value("{1")=20
</FONT><FONT face=3D"Arial CE">gives </FONT><FONT =
face=3DCourier>GET_FAIL=20
?</FONT></FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I'm writing chat program. The exchange =
of=20
messages&nbsp;could be done with sequences :</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>client will send something like <FONT=20
face=3DCourier>{myname,message,other_info}. </FONT><FONT face=3D"Arial =
CE">The=20
server&nbsp;will read buffer and then decide :</FONT></FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3D"Arial CE" size=3D2>GET_SUCCES =3D&gt; process =
message</FONT></DIV>
<DIV><FONT face=3D"Arial CE" size=3D2>GET_FAIL =3D&gt; error, ignore =
this message,=20
send warning to client</FONT></DIV>
<DIV><FONT face=3D"Arial CE" size=3D2>GET_EOF =3D&gt; whole message not =
sended yet,=20
read the buffer again</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3D"Arial CE" size=3D2>Should I use some special char =
after the end=20
of sequence ?</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3D"Arial CE" size=3D2>Thanks</FONT></DIV>
<DIV><FONT face=3D"Arial CE" =
size=3D2>------------------------<BR>Regards,<BR>Martin=20

------=_NextPart_000_0012_01C0C9D4.8BF346C0--

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu