The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
.
google unix.com



High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
help regarding socket programming abmxla007 High Level Programming 1 05-28-2008 03:17 AM
Socket Programming arunviswanath High Level Programming 7 01-30-2007 03:18 PM
Socket Programming socket soshell High Level Programming 2 06-29-2004 08:49 AM
Socket Programming joseph_shibu High Level Programming 1 11-05-2001 10:37 AM
Socket programming Nadeem Mistry High Level Programming 1 07-23-2001 05:33 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 11-16-2008
smdhd3 smdhd3 is offline
Registered User
  
 

Join Date: Nov 2008
Posts: 1
connect() function in C++ socket programming

Hello All,

I have a problem using connect(...) function in C++. I am using SSH from my windows system to connect it to linux server. The program works fine if I run it directly in Linux machine but I need it to run through windows machine.
The function returns -1 and so my program terminates.

Can anyone help? or tell me how to show the exact error in unix C++ program because I am getting '1076041180' error number and I can't figure what is the exact problem.

Thanks...
  #2 (permalink)  
Old 11-17-2008
wempy's Avatar
wempy wempy is offline
Registered User
  
 

Join Date: Jun 2006
Location: Harpenden, UK
Posts: 208
Code:
man perror
will help you decode error numbers
  #3 (permalink)  
Old 11-17-2008
Corona688 Corona688 is offline
Registered User
  
 

Join Date: Aug 2005
Location: Saskatchewan
Posts: 1,944
Incindentally the syntax for C sockets and C++ sockets is the same, you use the same system calls.
  #4 (permalink)  
Old 11-19-2008
srikumar_cs srikumar_cs is offline
Registered User
  
 

Join Date: Apr 2007
Posts: 12
Can u give out more details.. What are the parameters you are passing to Connect() call.. That will surely help.. Check that against the connect API. usually people go wrong with the second parameter, the DS storing the address, port ..
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 05:15 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0