LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-18-2003, 05:08 PM   #1
bit7
Member
 
Registered: Dec 2002
Location: Trieste, Italy
Distribution: salckware 8.0
Posts: 49

Rep: Reputation: 15
connect: socket operation on non-socket


hi all,

i've a terrible trouble...

I have installed Slackware 8.0, KDE 3.1.
All my network apps that uses socket are working fine.

If i write this C code, at the connect command i get the socket operation on non-socket

nt S1;

struct sockaddr_in sin;

/* create the socket1 */
if (S1 = socket (AF_INET, SOCK_STREAM, 0) < 0) {
perror ("socket ");
exit (0);
}


bzero(&sin, sizeof(sin));
sin.sin_family = AF_INET;
sin.sin_addr.s_addr = inet_addr ("62.211.69.7");

sin.sin_port = htons(6667);

if (connect(S1, (struct sockaddr *)&sin, sizeof(sin)) < 0) {
perror("Unable to connect to remote host");
exit(1);
}


I'm becoming crezy

Any help is appreciated

Bit7
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
getpeername: Socket operation on non-socket KevStA Linux - General 6 08-25-2020 12:40 PM
cannot read data at server socket, though client socket sends it jacques83 Linux - Networking 0 11-15-2005 01:58 PM
Unable to connect to UNIX socket /tmp/.esd/socket error while using grip dr_zayus69 Linux - Software 4 08-23-2005 07:28 PM
cannot connect to a socket from other computer duongvn Linux - Networking 4 04-14-2005 11:11 PM
MySQL can't connect through socket! Avatar Linux - Software 15 08-10-2004 01:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration