SCTP Discussions

Text archives Help


Re: [SCTP-Discussion] input/output error


Chronological Thread 
  • From: Thomas Dreibholz <dreibh AT exp-math.uni-essen.de>
  • To: "Oon Heok Kee" <oonheokkee78 AT hotmail.com>, discussion AT sctp.de
  • Subject: Re: [SCTP-Discussion] input/output error
  • Date: Tue Sep 3 15:32:01 2002
  • List-id: SCTP Discussions <discussion.sctp.de>
  • Organization: University of Essen, Institute for Experimental Mathematics

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

Am Dienstag, 3. September 2002 14:55 schrieb Oon Heok Kee:
> Hi,
>
> I've made use of what I understood from the echo-client codes that
> Thomas
> had corrected and tried to implement my knowledge on the echo-server
> program instead.
>
> It's now able to receive, but the moment it tries to echo back to the
> client, it gives an "input/output error". Can someone advise on what could
> be wrong? I've attached the client and server codes as attachments so that
> all of you can have a look. Thank you!!!

msg->msg_controllen = cmsglen - sizeof(echoBuffer);
msg_controllen is the length of the control data. Set it to zero (in case you
do not want to specify sctp_sndrcvinfo settings) or initialize cbuf with
cmsghdr and sctp_sndrcvinfo data and set it to the correct length; as you
have done in your client program.
But if you only want to keep the sctp_sndrcvinfo settings from the data block
you have just received by ext_recvmsg(), simply comment out the two lines
msg->msg_control = cbuf;
msg->msg_controllen = ...
msg->msg_control and msg->msg_controllen are still correctly initialized at
this point. Then, your program will send the reply with the same stream
number and PPID as the data received.


(&iov[0])->iov_len = sizeof(echoBuffer);
I think, this should be recvMsgSize or strlen(echoBuffer), unless you want to
reply the complete RCVBUFSIZE bytes of echoBuffer.


Best regards
- --
=======================================================================
Dipl.-Inform. Thomas Dreibholz

University of Essen, Room ES210
Inst. for Experimental Mathematics Ellernstraße 29
Computer Networking Technology Group D-45326 Essen/Germany
- -----------------------------------------------------------------------
E-Mail:
dreibh AT exp-math.uni-essen.de
Homepage: http://www.exp-math.uni-essen.de/~dreibh
=======================================================================
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9dLvH32BbsHYPLWURArNVAJ9EvubKjvN5JKPJOWuE9x4hZteszACgu2D9
WJyYbzoSjag1DbPGR2lEm10=
=xkow
-----END PGP SIGNATURE-----




Archive powered by MHonArc 2.6.19+.

Top of page