Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2007.04.29;
Скачать: CL | DM;

Вниз

Сокет   Найти похожие ветки 

 
Krab12345   (2006-12-03 21:46) [0]

Проблема в следующем, Есть массив элементов, каждый элемент передаю send-ом серверу таким образом
for i:=1 to 1000 do
Send(s,massiv[i],SizeOf(massiv[i]),$0000)

Принимаю след. кодом:
for i:=1 to 1000 do
recv(s,ss,SizeOf(ss),0)

У меня принимается только первый элемент, а на последующие
ошибка 10054. в MSDN-e:
An existing connection was forcibly closed by the remote host. This normally results if the peer application on the remote host is suddenly stopped, the host is rebooted, the host or remote network interface is disabled, or the remote host uses a hard close (see setsockopt for more information on the SO_LINGER option on the remote socket). This error may also result if a connection was broken due to keep-alive activity detecting a failure while one or more operations are in progress. Operations that were in progress fail with WSAENETRESET. Subsequent operations fail with WSAECONNRESET.

Что я делаю не так??? Обьясните плиз!


 
случайно   (2006-12-04 08:14) [1]

Что я делаю не так??? Обьясните плиз!
Не надо сразу закрывать сокет на передающей стороне. Используй shutdown для "аккуратного размыкания" с обоих сторон.


 
Сергей М. ©   (2006-12-04 08:15) [2]


> Что я делаю не так?


На принимающей стороне закрываешь соединение неожиданно для передающей стороны.



Страницы: 1 вся ветка

Текущий архив: 2007.04.29;
Скачать: CL | DM;

Наверх




Память: 0.47 MB
Время: 0.044 c
2-1176202688
Juice
2007-04-10 14:58
2007.04.29
Создать лист из шаблона


2-1175825813
VolanD666
2007-04-06 06:16
2007.04.29
BytesPerScanLine


2-1176065515
Officeman
2007-04-09 00:51
2007.04.29
TLIstView selected


11-1157112447
Vorontsov
2006-09-01 16:07
2007.04.29
Проблема с формами


9-1148749051
DevilDevil
2006-05-27 20:57
2007.04.29
Как совмещать 3D & 2D