find free port


 
Thread Tools Search this Thread
Top Forums Programming find free port
# 1  
Old 02-25-2005
find free port

how can i find whether the particular port is free among certain port numbers
like 15000 to 30000 before i connect to the server by assigning the port no for the client
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Bash script, find the next closed (not in use) port from some port range.

hi, i would like to create a bash script that check which port in my Linux server are closed (not in use) from a specific range, port range (3000-3010). the print output need to be only 1 port, and it will be nice if the output will be saved as a variable or in same file. my code is: ... (2 Replies)
Discussion started by: yossi
2 Replies

2. Solaris

How to find port number wwn of particular port on dual port HBA,?

please find the below o/p for your reference bash-3.00# fcinfo hba-port HBA Port WWN: 21000024ff295a34 OS Device Name: /dev/cfg/c2 Manufacturer: QLogic Corp. Model: 375-3356-02 Firmware Version: 05.03.02 FCode/BIOS Version: BIOS: 2.02; fcode: 2.01;... (3 Replies)
Discussion started by: sb200
3 Replies

3. AIX

How to find AIX Free Memory?

All, AIX: 6.1 64 bits How to find out Free memory available on AIX 6.1 64 bits When I used : svmon -G size inuse free pin virtual mmode memory 1048576 612109 191151 215969 549824 Ded-E pg space 4325376 ... (1 Reply)
Discussion started by: a1_win
1 Replies

4. Programming

How to free a port?

hi all, Im using a tcp socket for communication. After all the communications I close the socket and bind another socket to the same port. But it shows bind error. I see it is due to the port no being used immediately. But i am closing the first socket before the binding the second one to the... (9 Replies)
Discussion started by: v1jay
9 Replies

5. Red Hat

How do i find free space in my unix?

Hello, I wanted to calculate free space in my unix file system. Here is my direction. I can use df -h command to get the below output. Filesystem Size Used Avail Use% Mounted on =================================================== /dev/vx/dsk/edcdg/data01vol ... (9 Replies)
Discussion started by: govindts
9 Replies

6. Red Hat

how to find out free memory?

hi, I have done the below, but am confused as to how much memory is "free" please help thanks $ free total used free shared buffers cached Mem: 132033488 48827536 83205952 0 1007696 45404632 -/+ buffers/cache: 2415208 ... (7 Replies)
Discussion started by: JamesByars
7 Replies

7. Shell Programming and Scripting

find the free space of a particular directory

Hi Guys, I want to find the free space of a particular directory,, Regards, Magesh (3 Replies)
Discussion started by: mac4rfree
3 Replies

8. HP-UX

Where to find HP-UX free for learning

Hello, I am new in UNIX in the UNIX world; there are lots of versions. Is there any version HP-UX to run on Intel x86 or better VMWARE or other virtualization platform? ...and of course, because I would like to learn, Unix be free Thank (2 Replies)
Discussion started by: postfind
2 Replies

9. UNIX for Dummies Questions & Answers

How do I find out how much swap and memory is free?

In Solaris 2.6 and 8 How do I find out how much swap and memory is free? Also how can I see how much memory each process is consuming? Thanks in advance (2 Replies)
Discussion started by: expos
2 Replies

10. UNIX for Dummies Questions & Answers

how to know whether particular port number is free or not

I wish to know whether a particular port is free or not in my SUN solaris SPARC machine . I wish to use that particular port for one server software. How do I know that. (2 Replies)
Discussion started by: Hitesh Shah
2 Replies
Login or Register to Ask a Question
XvGrabPort(3)							  libXv Functions						     XvGrabPort(3)

NAME
XvGrabPort - lock port for exclusive use by client SYNOPSIS
#include <X11/extensions/Xvlib.h> int XvGrabPort(Display *dpy, XvPortID port, Time time); ARGUMENTS
dpy Specifies the connection to the X server. port Defines the port to be grabbed. time Specifies the request timestamp. DESCRIPTION
XvGrabPort(3) grabs a port. Once a client grabs a port, only that client can make video requests to that port. If the time is before the current port time, the XvGrabPort request is ignored and XvInvalidTime is returned. If the port is already grabbed by another client, XvAlreadyGrabbed is returned. Otherwise it returns a status of Success. The port time is updated when the fol- lowing requests are processed: XvGrabPort(3), XvUngrabPort(3), XvPutVideo(3), XvPutStill(3), XvGetVideo(3), XvGetStill(3). If the port is actively processing video for another client, the video is preempted, and an XvVideoNotify event with detail XvPreempted is generated for its drawable. RETURN VALUES
[Success] Returned if XvGrabPort(3) completed successfully. [XvInvalidTime] Returned if requested time is older than the current port time. [XvAlreadyGrabbed] Returned if the port is already grabbed by another client. [XvBadExtension] Returned if the Xv extension is unavailable. [XvBadAlloc] Returned if XvGrabPort(3) failed to allocate memory to process the request. DIAGNOSTICS
[XvBadPort] Generated if the requested port does not exist. SEE ALSO
XvUngrabPort(3), XvVideoNotify(3) X Version 11 libXv 1.0.9 XvGrabPort(3)