Sponsored Content
Top Forums Programming UNIX network programming execution problem Post 302946538 by rbatte1 on Wednesday 10th of June 2015 05:53:09 AM
Old 06-10-2015
Well, the target IP address you have given is the local host, 127.0.0.1 so that will come back to your own machine, but what port is your program connecting to? You will need to check that you have a server process listening to that port on either 127.0.0.1 or generally on all ports.

The output from netstat -na | grep LISTEN may help you see what is actually being listened for before you try to connect.

Can you share the code so someone (probably with more skill than I) can comment?



Thanks, in advance,
Robin
This User Gave Thanks to rbatte1 For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Unix Network Programming

I am going to purchase Unix Network Programming by Stevens. The only question I have is which edition to buy. The older (early 90's) edition, or the newer (late 90's) edition. I know conventional thinking would point to the latest ( and greatest?), but I wanted to get some feedback from the forum.... (3 Replies)
Discussion started by: dangral
3 Replies

2. Programming

Network Programming in Unix

Good day everyone, Please help if you are interested in. I need to do a chat client-server program. Does anyone know where I can get references or sample programs? Thank you very much for your time Eric (2 Replies)
Discussion started by: powermind
2 Replies

3. UNIX for Dummies Questions & Answers

Unix and Linux Network Programming

I want to develop a hybrid IM application which will consist of a chat and an offline messaging (BBS) part. Server must support Multiple connection (concurrent) Arguments should not be hard coded (code will be checked at different machines) No input at the command line Must run in the... (3 Replies)
Discussion started by: never mind
3 Replies

4. UNIX for Dummies Questions & Answers

Wireless network programming in Unix (question)

Greetings everyone, I've been using OpenWRT for some time primarly for research in the University. I've also started with some basic network programming (sending UDP packets for instance). But since most of the available tutorials on unix network programming are more related to ethernet... (4 Replies)
Discussion started by: aztroboy
4 Replies

5. Programming

Unix network programming

Hi! I am working on fedora.. trying to execute BSD4.4 client-server program which includes "unp.h" header file... While executing make command, I got error like, " expected " , " , " ; ",or ")" in connect_nonb file...ERROR 1 " I tried to change mode of makefile but I can't get... (4 Replies)
Discussion started by: nisha_vaghela
4 Replies

6. Programming

Unix Network Programming

I have written a client-server program which does some data from a file in server to the client. In this I don't want the client to wait indefinitely if server is not running. For this I am using SELECT system call, in this system call we can specify timings as an argument, which tells the client... (2 Replies)
Discussion started by: naresh046
2 Replies

7. UNIX for Dummies Questions & Answers

How does unix system administration, unix programming, unix network programming differ?

How does unix system administration, unix programming, unix network programming differ? Please help. (0 Replies)
Discussion started by: thulasidharan2k
0 Replies

8. IP Networking

Network programming on UNIX env on windows

Hi, I have to start doing network programming in C/Unix but I have windows installed. Could someone please guide me how to set up the environment best suited for the networking programming? Regards Vinayak (1 Reply)
Discussion started by: vinayakj20
1 Replies

9. Programming

UNIX Network Programming making files problem

I have started reading the book Unix Network Programming, Volume 1: The Sockets Networking API. I downloaded all the source code and the readme says I must make the files. zuro@zuro:~/book/unpv12e$ cd lib zuro@zuro:~/book/unpv12e/lib$ make gcc -g -O2 -D_REENTRANT -Wall -c -o... (5 Replies)
Discussion started by: xuro
5 Replies

10. UNIX for Advanced & Expert Users

Is it possible to understand the subjects of 2nd volume of UNIX Network Programming with APUE

Is it possible to study second volume of Unix Network Programming - Interprocess communication (by Stevense) with Advanced Programming in Unix Environment by the same author? I've got the idea that the topics/subjects in second volume has more to do with non network programming hence it seems... (0 Replies)
Discussion started by: vectrum
0 Replies
C(7)						       BSD Miscellaneous Information Manual						      C(7)

NAME
c, c78, c89, c90, c99 -- The C programming language DESCRIPTION
C is a general purpose programming language, which has a strong connection with the UNIX operating system and its derivatives, since the vast majority of those systems were written in the C language. The C language contains some basic ideas from the BCPL language through the B lan- guage written by Ken Thompson in 1970 for the DEC PDP-7 machines. The development of the UNIX operating system was started on a PDP-7 machine in assembly language, but it made very difficult to port the existing code to other systems. In 1972 Dennis M. Ritchie worked out the C programming language for further development of the UNIX operating system. The idea was to imple- ment only the C compiler for different platforms, and implement most part of the operating system in the new programming language to simplify the portability between different architectures. It follows that C is very eligible for (but not limited to) writing operating systems and low-level applications. The C language did not have a specification or standardized version for a long time. It went through a lot of changes and improvements for ages. In 1978, Brian W. Kernighan and Dennis M. Ritchie published the first book about C under the title "The C Programming Language". We can think of this book as the first specification of the language. This version is often referred as K&R C after the names of the authors. Sometimes it is referred as C78, as well, after the publishing year of the first edition of the book. It is important to notice, that the instruction set of the language is limited to the most fundamental elements for simplicity. Handling of the standard I/O and such common functions are implemented in the libraries shipped with the compiler. As these functions are also widely used, it was demanded to include into the description what requisites the library should conform to, not just strictly the language itself. Accordingly, the aforementioned standards cover the library elements, as well. The elements of this standard library is still not enough for more complicated tasks. In this case the provided system calls of the given operating system can be used. To not lose the portability by using these system calls, the POSIX (Portable Operating System Interface) standard evolved. It describes what functions should be available to keep portability. Note, that POSIX is not a C standard, but an operating system standard and thus is beyond the scope of this manual. The standards discussed below are all C standards and only cover the C programming language and the accompanying library. After the publication of the book mentioned before, the American National Standards Institute (ANSI) started to work on standardizing the language, and they announced ANSI X3.159-1989 in 1989. It is usually referred as ANSI C or C89. The main difference in this standard were the function prototypes, which is a new way of declaring functions. With the old-style function declarations, the compiler was unable to check the sanity of the actual parameters at a function call. The old syntax was highly error-prone because incompatible parameters were hard to detect in the program code and the problem only showed up at run-time. In 1990, the International Organization for Standardization (ISO) adopted the ANSI standard as ISO/IEC 9899:1990 in 1990. This is also referred as ISO C or C90. It only contains negligible minor modifications against ANSI C, so the two standards often considered to be fully equivalent. This was a very important milestone in the history of the C language, but the development of the language did not stop. The ISO C standard was later extended with an amendment as ISO/IEC 9899 AM1 in 1995. This contained, for example, the wide-character support in wchar.h and wctype.h. Two corrigenda were also published: Technical Corrigendum 1 as ISO/IEC 9899 TCOR1 in 1995 and Technical Corrigendum 2 as ISO/IEC 9899 TCOR1 in 1996. The continuous development and growth made it necessary to work out a new standard, which contains the new features and fixes the known defects and deficiencies of the language. As a result, ISO/IEC 9899:1999 was born in 1999. Similarly to the other standards, this is referred after the publication year as C99. The improvements include the following: o Inline functions o Support for variable length arrays o New high-precision integer type named long long int, and other integer types defined in stdint.h o New boolean data type implemented in stdbool.h o One line comments taken from the C++ language o Some new preprocessor features o New variables can be declared anywhere, not just in the beginning of the program or program blocks o No implicit int type Since then new standards have not been published, but the C language is still evolving. New and useful features have been showed up in the most famous C compiler: GNU C. Most of the UNIX-like operating systems use GNU C as a system compiler, but those addition in GNU C should not be considered as standard features. SEE ALSO
c89(1), c99(1), cc(1) STANDARDS
ANSI, X3.159-1989. ISO/IEC, 9899:1990, Programming languages -- C. ISO/IEC, 9899 AM1. ISO/IEC, 9899 TCOR1, Programming languages -- C, Technical Corrigendum 1. ISO/IEC, 9899 TCOR2, Programming languages -- C, Technical Corrigendum 2. ISO/IEC, 9899:1999, Programming languages -- C. HISTORY
This manual page first appeared in FreeBSD 9.0. AUTHORS
This manual page was originally written by Gabor Kovesdan <gabor@FreeBSD.org>. BSD
May 30, 2011 BSD
All times are GMT -4. The time now is 03:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy