WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

s... Socket Functions

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

sSendString of Ascii Zero

Keywords: 	  sSendString	 pPutByte(port,0)

Question:

Does anyone know how to make sSendString send the character with the ASCII code of zero?

If you do this:

   sSendString(socket,strcat(num2char(65),num2char(0),num2char(65)))
it only sends 65 and 65 (omitting the zero). It was driving me crazy so I finally got a packet sniffer to check it, and it is indeed omitting the zero character.

(You need to send a zero character when negotiating the binary mode transfer in a telnet session.)

Answer:

You cannot do it with the string functions.

Need somethng like a pPutByte(port,0) to do it. pPutByte is in the Serial Extender.


Article ID:   W12671
Filename:   sSendString with Ascii Code of 0.txt
File Created: 2002:05:16:11:05:04
Last Updated: 2002:05:16:11:05:04