You are here: Re: Problem reading/writing sockets « PHP Programming Language « IT news, forums, messages
Re: Problem reading/writing sockets

Posted by Jerry Stuckle on 10/26/07 03:43

Can2002 wrote:
> On 25 Oct, 13:56, Jerry Stuckle <jstuck...@attglobal.net> wrote:
>> Well, it sounds like you need to look at what's actually being
>> communicated. It could seem to hang of it's waiting for a response from
>> the remote device which doesn't come, for instance.
>
> Thanks again Jerry,
>
> I did wonder that, which was what led me to try the single quotes. I
> know the box responds after a newline, both from seeing the effect of
> removing it from my python app or connecting via Telnet. Am I right
> in thinking that echoing "\n" will result in a newline character being
> sent?
>
> Sorry if it sounds like a stupid question...
>
> Chris
>
>

Chris,

Echoing a "\n" won't send it over the socket, but I don't think that's
what you mean.

Sending a "\n" over the socket should send a newline character. But is
your device expecting a new line (Unix style) or a cr/lf (Windows
style)? If the latter, try "\r\n".

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация