Date: Wed, 4 Aug 1999 08:33:23 -0700 (PDT) From: ypoeluev@certicom.com To: freebsd-gnats-submit@freebsd.org Subject: i386/12964: Outgoing data with stream sockets on FreeBSD Message-ID: <19990804153323.C62C9153C4@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 12964 >Category: i386 >Synopsis: Outgoing data with stream sockets on FreeBSD >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Aug 4 08:40:01 PDT 1999 >Closed-Date: >Last-Modified: >Originator: Yuri Poeluev >Release: 2.2.5 >Organization: Certicom Corp. >Environment: FreeBSD certicom.com 2.2.5-RELEASE FreeBSD 2.2.5-RELEASE #0: Thu Jun 4 16:01:24 EDT 1998 root@:/usr/src/sys/compile/GALOIS i386 >Description: Hi, I'm using stream sockets for client and server communications and have found a problem with data sent from FreeBSD to any other platform (Solaris,WinNT,BSDi,etc). When the data has a size in the range 101-207 bytes, the receiver gets only 100 bytes. By the way, I was using blocking sockets and if I tried to read data again on the receiver side (other then FreeBSD), read operation can't succeed because apparently no data left for reading. There might have been some settings when we built our kernel, but I couldn't find anything. Your help will be appretiated. Thanks. >How-To-Repeat: On the server side (FreeBSD) ===================================== theSocket = socket(AF_INET, SOCK_STREAM, 0); theAddress.sin_port = htons((unsigned short)kPort); theAddress.sin_family = AF_INET; bind(theSocket, (struct sockaddr *)&theAddress, sizeof(theAddress)); listen(theSocket, 5); len = sizeof(theAddress); hisSocket = accept(theSocket,(struct sockaddr*)&theAddress, &len); send(hisSocket,buffer,105,0); ... On the client side (any other platform) ===================================== s = socket(AF_INET, SOCK_STREAM, 0); ent = gethostbyname(kServer); addressRec.sin_port = htons((unsigned short)kPort); addressRec.sin_family = AF_INET; addressRec.sin_addr = *((struct in_addr *)ent->h_addr); connect(s, (struct sockaddr *) &addressRec, sizeof(addressRec)); l=recv(s,buffer,sizeof(buffer),0); /* only 100 bytes read */ ... >Fix: >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990804153323.C62C9153C4>