🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.programming
Article #556

Re: Address already in use

#556
From: ar... Artur Urbanowicz
Date: Tue, 23 Apr 1996 00:00
23 lines
878 bytes
/* 
   Piotrze - uzyj funkcji setsockopt() w podany nizej sposob.

   Pozdrawiam: Artur Urbanowicz
*/

int one = 1;

if( (tep = socket(PF_INET,SOCK_STREAM,IPPROTO_TCP)) == -1 )
{
  printf( "Could not get a free socket: %s", strerror(errno) );
  return -1;
}

if( setsockopt( tep,SOL_SOCKET,SO_REUSEADDR,(char *)&one,sizeof(one) ) )
{
  printf( "Could not set socket option SO_REUSEADDR: %s", strerror(errno) );
  return -1;
}

.
.
.
Technical Details
Message-ID: <4lhv60$b2l@helios.man.lublin.pl>
Path: mbox-mo1.pugleaf.net!unknown!not-for-mail
References: <4ld29s$b76@galaxy.uci.agh.edu.pl> <4lg82t$87j@parnas.mimuw.edu.pl> <4lgo8d$gat@galaxy.uci.agh.edu.pl>

Show Full Headers
Complete Article Headers
From: ar...@apollo.umcs.lublin.pl (Artur Urbanowicz)
Subject: Re: Address already in use
Date: 1996/04/23
Message-ID: <4lhv60$b2l@helios.man.lublin.pl>
X-Deja-AN: 150943995
references: <4ld29s$b76@galaxy.uci.agh.edu.pl> <4lg82t$87j@parnas.mimuw.edu.pl> <4lgo8d$gat@galaxy.uci.agh.edu.pl>
newsgroups: pl.comp.programming
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit