SCTP Discussions

Text archives Help


[SCTP-Discussion] Building SCTP appl


Chronological Thread 
  • From: Torbjorn Andersson <tora AT tora-pc.cs.kau.se>
  • To: discussion AT sctp.de
  • Subject: [SCTP-Discussion] Building SCTP appl
  • Date: Mon Apr 8 10:37:00 2002
  • List-id: SCTP Discussions <discussion.sctp.de>

Hello. I'm developing a HTTP prototypes, client and server, which use the
socketApi. Saidly I'm not able to build stable applications. Saidly my
programs crashes inside your SCTP libraries. I have copied and pasted from
your makefile in socket_program dir but with no success. I have tested
sctptftp and it works just fine.

I'm developing on Redhat-7.2
Can I get some info on this matter ?

I'm using the Socket::sendMsg() and Socket::recieveMsg(), because I want to
use all the streams of SCTP. Is there something special I should think of
when i use them.
I tried with this code:
{
SocketMessage<CSpace(sizeof(sctp_sndrcvinfo))> message;

header = generateHeader(200,fileReq);
message.clear();
message.setBuffer(header,strlen(header));
info = (sctp_sndrcvinfo*)message.addHeader(sizeof(sctp_sndrcvinfo),
IPPROTO_SCTP,SCTP_SNDRCV);
info->sinfo_assoc_id = 0;
info->sinfo_stream = atoi(destStreamStr);
info->sinfo_flags = 0;
info->sinfo_ppid = 0;
info->sinfo_timetolive = 0;
ServerSocket->sendMsg(&message.Header,0);

while(feof(file) == 0){
length = fread(buffer,sizeof(char),MAX_MESSAGE_SIZE,file);
if(ferror(file) == 0){
message.clear();
message.setBuffer(buffer,length);
info = (sctp_sndrcvinfo*)message.addHeader(sizeof(sctp_sndrcvinfo),

IPPROTO_SCTP,SCTP_SNDRCV);
info->sinfo_assoc_id = 0;
info->sinfo_stream = atoi(destStreamStr);
info->sinfo_flags = 0;
info->sinfo_ppid = 0;
info->sinfo_timetolive = 0;
if(ServerSocket->sendMsg(&message.Header,0) == -1){
cerr << "unable to send data\n";
}
}

}

/Thanks
Torbjörn




  • [SCTP-Discussion] Building SCTP appl, Torbjorn Andersson, 04/08/2002

Archive powered by MHonArc 2.6.19+.

Top of page