Linux-Bulgaria.ORG
навигация

 

начало

пощенски списък

архив на групата

семинари ...

документи

как да ...

 

 

Предишно писмо Следващо писмо Предишно по тема Следващо по тема По Дата По тема (thread)

Re: lug-bg: socket programming


  • Subject: Re: lug-bg: socket programming
  • From: firedust@xxxxxxx (Stanislav Lechev)
  • Date: Mon, 28 May 2001 14:33:44 +0300



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Monday 28 May 2001 13:36, you wrote:
[.....]

znachi redowete si gi prashtam az :)
i znam koga si prashtam red i koga bukwa...
posle initialize-a stawa server side a
ne client-skiq
t.e. ti kato wlizash na cisco-to
twoq telnet client ne move da otgatne che wlizash
na cisco i da prashta po 1 byte 
wmesto da buferira cqla liniq

i tochno za towa stawa duma
che az polzwah read
znachi situaciqta

imam demon slushasht na XXX port
idwa connect i demona prawi read na 1 byte
az pisha otdrugata strana 1 byte
ama demona neznae za towa ....
pisha oshte 21 bytes
demona oshte neznae
natiskam enter-a i togawa demona nauchawa

praw si za read/write
a i az ne se seshtam kwo drugo move da se polzwa
za read/write ot socket-a
oswen ako ne copirame FD-to (dup2)

no ne e w towa problema
problema e che ima line buffer

setvbuf(3)
setvbuf - stream buffering operations

_IONBF unbuffered
_IOLBF line buffered
_IOFBF fully buffered

eto za towa goworq
po default e _IOLBF

etvbuf(stdin, (char *) NULL, _IONBF, 0);
setvbuf(stdout, (char *) NULL, _IONBF, 0);

eto taka mahame bufera na kakwoto si iskame
no ne i na tcp socket :)

>
> Ima dve veroiartni prichini za problema ti:
>
> 1. Otsreshtnata strana ti parshta celi redove. Togava kvoto i da
> pravish, reda shte ti doide celia navednaj.
>
> 2. Izpolzvash mnogo visoko nivo na dostap.
> Az polzvam "read" i "write" sas socket file descriptors i niamam
> problemi s cheteneto na 1 byte.
> Za poveche info izpalni:
>
> man 2 read
> man 2 write

- -- 
- -===============================================================-
- - Regards,                                            AngelFire -
- -     Stanislav Lechev                    <firedust@xxxxxxx>    -
- -    PGP Key: http://firedust.vega.bg/pgp/StanislavLechev.asc   -
- -  Vega Internet Service Provider (tm)  --  http://www.vega.bg  -
- -===============================================================-
   Everyone is a genius. 
     It's just that some people are too stupid to realize it.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE7EjeZ8RPXBhiMqewRAskZAJ41FDwHZ/rf83oLipQwc11pEQ8VewCcDSFN
nOro49ehtRiuel6ppoSZR3E=
=6dXh
-----END PGP SIGNATURE-----
===========================================================================
A mail-list of Linux Users Group - Bulgaria (bulgarian linuxers)
http://www.linux-bulgaria.org/ Hosted by Internet Group Ltd. - Stara Zagora



 

наши приятели

 

линукс за българи
http://linux-bg.org

FSA-BG
http://fsa-bg.org

OpenFest
http://openfest.org

FreeBSD BG
http://bg-freebsd.org

KDE-BG
http://kde.fsa-bg.org/

Gnome-BG
http://gnome.cult.bg/

проект OpenFMI
http://openfmi.net

NetField Forum
http://netField.ludost.net/forum/

 

 

Linux-Bulgaria.ORG

Mailing list messages are © Copyright their authors.