TCP/IP in c (unix)


 
Thread Tools Search this Thread
Special Forums IP Networking TCP/IP in c (unix)
# 1  
Old 09-16-2005
TCP/IP in c (unix)

I have written a client receive (TCP/IP) program which is up all the time. It connects to the server during Beginning of the day and stays alert and reads a message whenever one comes in.

the problem is after receiving a message, the client_receive program is getting a message with zero bytes. Why I am getting the zero bytes? What is the reason. The server is still up and is running fine....
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Too much TCP retransmitted and TCP duplicate on server Oracle Solaris 10

I have problem with oracle solaris 10 running on oracle sparc T4-2 server. Os information: 5.10 Generic_150400-03 sun4v sparc sun4v Output from tcpstat.d script TCP bytes: out outRetrans in inDup inUnorder 6833763 7300 98884 0... (2 Replies)
Discussion started by: insatiable1610
2 Replies

2. HP-UX

Logging into UNIX via TCP/IP Telnet

I can connect to the UNIX box using a TCP/IP Telnet session but the UNIX does not respond with the login prompt. The box responds to a PING and the Telnet session actually connects, but no prompt of any sort is recieved back. I can connect via the console, get the login prompt and can login. ... (3 Replies)
Discussion started by: Newnix
3 Replies

3. Programming

[C++] [Unix] TCP non-blocking. Detect server disconnection procedure over, from client.

Hello! I searched forum for similar topic, with no luck, if you know one, delete this topic, and send me private message with link please. Little background: I have a lot of clients and one serwer. Client can make multiple connections on different ports and ips, but only one can be acctive... (2 Replies)
Discussion started by: ikeban
2 Replies

4. SCO

TCP in sco unix 3.2

Hi every body. I am looking for TCP package under sco unix 3.2 or sco xenix system. would you please help me? (7 Replies)
Discussion started by: javad1_maroofi
7 Replies

5. UNIX for Dummies Questions & Answers

TCP(?) Printing from Unix

I am trying to set up a unix server to print to a printer in another city. I've got a "Unix" guy helping me set up the printer on the unix box, but we are having trouble. The printer is located on an HP JetDirect 170x print server on a private network. On the router at that location, I have... (4 Replies)
Discussion started by: Bortiquai
4 Replies

6. SCO

all tcp are CLOSED on SCO Unix on VMWARE

Hi folks, First of all, sorry about my english, isn't the best and thks for advance. Here es my problem... I have virtualize an SCO unix with VMware ESX 3 and everything was going on beatifull until that i try to connect from anorther host, i can't do it so i check the connection with... (5 Replies)
Discussion started by: martocapo
5 Replies

7. UNIX for Dummies Questions & Answers

Unix stopping the tcp services

Hi There We currently experiencing a problem on our Unix server Sco 5.07 , whereby the tcp services stops on it own and even if we restart the services manually the services still does not come up,We loose the printer and pc connections to the server we then need to restart the Unix server in... (1 Reply)
Discussion started by: esh
1 Replies

8. UNIX for Dummies Questions & Answers

SCO UNIX "TCP/IP not licensed error"

I have been running 5.0.02 for more than 10 years in its present configuration. I am running a business software package on it (text based). I am trying to use my windows machines to access it through a program like "reflections" so that I can run my software from different systems but I get... (2 Replies)
Discussion started by: Parkegio
2 Replies

9. IP Networking

Unix Scripts & Counting TCP Connections

Here's a question I received on a test recently. I'm new to Linux/Unix so if this is easy, don't kill me. What scripting or tools could you use to count and sort the number of connections from each internal host? I'd appreciate any feedback and resources. "The Cisco PIX firewall provides... (5 Replies)
Discussion started by: daveohr
5 Replies

10. UNIX for Dummies Questions & Answers

Unix TCP/IP ping to other subnet

I have Digital UNIX V4.0B (Rev. 564) on alpha machine. I'm trying to acces network in subnet (192.168.1.x). Ip on Alpha comp. is from 192.168.3.X subnet. My default gateway on this network is 192.168.3.1 and it working OK from other machines. This machine is visible from same subnet... (2 Replies)
Discussion started by: ermingut
2 Replies
Login or Register to Ask a Question
XOpenDisplay()															    XOpenDisplay()

Name
  XOpenDisplay - connect a client program to an X server.

Synopsis
  Display *XOpenDisplay(display_name)
	char *display_name;

Arguments
  display_name	 Specifies the display name, which determines the server to connect to and the communications domain to be used.  See
		 Description below.

Returns
  The display structure.

Description
  The XOpenDisplay() routine connects the client to the server controlling the hardware display through TCP or DECnet communication proto-
  cols, or through some local inter-process communication protocol.

  On a POSIX-conformant system, if display_name is NULL, the value defaults to the contents of the DISPLAY environment variable on POSIX-
  based systems.  On non-UNIX-based systems, see that operating system's Xlib manual for the default display_name.  The encoding and inter-
  pretation of the display name is implementation-dependent.  Strings in the Host Portable Character Encoding are supported; support for
  other characters is implementation-dependent.  The display_name or DISPLAY environment variable is a string that has the format host-
  name:server	or   hostname:server.screen.  For example, frog:0.2 would specify screen 2 of server 0 on the machine frog.

  hostname    Specifies the name of the host machine on which the display is physically connected.  You follow the hostname with either a
	      single colon (:) or a double colon (::), which determines the communications domain to use.  Any or all of the communication
	      protocols can be used simultaneously on a server built to support them (but only one per client).

	      o  If hostname is a host machine name and a single colon (:) separates the hostname and display number, XOpenDisplay() connects
		 to the server using TCP streams.  If the hostname is not specified, Xlib uses what it believes is the fastest transport.

	      o  If hostname is a host machine name and a double colon (::) separates the hostname and display number, XOpenDisplay() con-
		 nects with the server using DECnet streams.  To use DECnet, however, you must build all software for DECnet.  A single X
		 server can accept both TCP and DECnet connections if it has been built for DECnet.

	      o  Note that support for use of the string "unix" in a display name is no longer part of the Xlib specification as of Release
		 4.

  server      Specifies the number of the server on its host machine.  This display number may be followed by a period (.).  A single CPU can
	      have more than one display; the displays are numbered starting from 0.

  screen      Specifies the number of the default screen on server.  Multiple screens can be connected to (controlled by) a single X server,
	      but they are used as a single display by a single user.  screen merely sets an internal variable that is returned by the
	      DefaultScreen() macro.  If screen is omitted, it defaults to 0.

  If successful, XOpenDisplay() returns a pointer to a Display.  This structure provides many of the specifications of the server and its
  screens.  If XOpenDisplay() does not succeed, it returns NULL.

  After a successful call to XOpenDisplay(), all of the screens on the server may be used by the application.  The screen number specified in
  the display_name argument serves only to specify the value that will be returned by the DefaultScreen() macro.  After opening the display,
  you can use the ScreenCount() macro to determine how many screens are available.  Then you can reference each screen with integer values
  between 0 and the value returned by (ScreenCount() -1).  You can access elements of the Display and Screen structures only using the infor-
  mation macros and functions listed in Appendix C, Macros.

  For more information, see Volume One, Chapter 2, X Concepts, and Chapter 3, Basic Window Program.

See Also
  XDefaultScreen(), XCloseDisplay(), XFree(), XNoOp().

Xlib - HouseKeeping														    XOpenDisplay()