I have server, daemon and client (daemon and client on the same machine).
When client starts it send query to the server, server send query
to the deamon (daemon check if the client exist), daemon send a response
to the server, server send a response to the client.
First I had following numbers of udp ports:
S_PORT 2613 /* Server Port number */
S1_PORT 2614 /* Server Port for Daemon response */
C_PORT 2620 /* Client Port number */
S_APP_PORT 2624 /* application info port */
D_PORT 2619 /* Daemon Port number */
Above configuration was good on various unix systems
(IRIX, HP-UX, SunOS, SuSE) except RedHat.
bind() function put in errno EADDRINUSE - Address already in use
Then I read in RedHat info:
"If you write a server that is not one of the standard ones defined in
the database, you must choose a port number for it. Use a number
greater than `IPPORT_USERRES ERVED'; such numbers are reserved for
servers and won't ever be generated automatically by the system.
Avoiding conflicts with servers being run by other users is up to you."
So I changed the ports as follow (because IPPORT_USERRESE RVED == 5000):
S_PORT 5006 /* Server Port number */
S1_PORT 5002 /* Server Port for Daemon response */
C_PORT 5003 /* Client Port number */
S_APP_PORT 5004 /* application info port */
D_PORT 5007 /* Daemon Port number */
It's working on RedHat9.0 but it's not working on RedHat7.3
I know that during binding the client socket I can give 0
instead a number of port (kernel will bind the number of client port
dynamically) but during binding server socket I must specify
number of server port (client must know where will send the data to)
Is there some function in unix which reserve port for my server?
Help me please, I'am beginner in unix network programming.
Regards,
Aleksander Wodynski 2 3726
Aleksander Wodynski <no************ @o2.pl> scribbled the following: I have server, daemon and client (daemon and client on the same machine). When client starts it send query to the server, server send query to the deamon (daemon check if the client exist), daemon send a response to the server, server send a response to the client.
Hold it. ISO standard C, the topic of this newsgroup, defines no
networking facilities whatsoever. Please ask in a newsgroup dedicated to
your own implementation. Thanks.
--
/-- Joona Palaste (pa*****@cc.hel sinki.fi) ---------------------------\
| Kingpriest of "The Flying Lemon Tree" G++ FR FW+ M- #108 D+ ADA N+++|
| http://www.helsinki.fi/~palaste W++ B OP+ |
\----------------------------------------- Finland rules! ------------/
"I am looking for myself. Have you seen me somewhere?"
- Anon
On Wed, 01 Oct 2003 19:27:11 +0200, Aleksander Wodynski
<no************ @o2.pl> wrote in comp.lang.c: I have server, daemon and client (daemon and client on the same machine). When client starts it send query to the server, server send query to the deamon (daemon check if the client exist), daemon send a response to the server, server send a response to the client.
[snip]
The C language has no built-in support for networking. It does not
support daemons, sockets, or bind(). All of these are platform
specific extensions, so this is not a language issue.
You need to ask in a group like news:comp.unix. programmer or one of
the news:comp.os.li nux.development .* groups. The question is
off-topic here.
--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.l earn.c-c++ ftp://snurse-l.org/pub/acllc-c++/faq This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Alexander N. Spitzer |
last post by:
If I have a machine with 3 virtual IP addresses (192.168.1.), how
can I start 3 instances of the same RMI application (each started with
different properties/configs), each listening on the port 1234, but each
instance binds to a different ip address.
that is to say:
instance #1 binds to 192.168.1.5/port 1234
instance #2 binds to 192.168.1.6/port 1234
instance #3 binds to 192.168.1.7/port 1234
|
by: Rodrigo Benenson |
last post by:
Hi,
I have a weird need in tkinter. If I have a widget I can *set* a binding
..bind("<the event>", the_callback)
I also can *append* a binding
..bind("<the event>", the_second_callback, "+")
|
by: Dennis Chang |
last post by:
Hi all,
I was reading about function pointers and came across something which
intrigued me.
K&R2 calls qsort (pg.119) within main as so:
qsort( (void **) lineptr, 0, nlines-1, (int (*) (void *, void*))(numeric ?
numcmp : strcmp) );
I guess what interests me is the nameless function pointer and then the
|
by: Timm |
last post by:
I have an ASP.NET 2.0 page with two DropDownLists. I am using declarative
data binding wherever possible and trying to minimize the use of code. The
list of values in DropDownList DDL2 should be (filtered) dependent upon the
selection in DDL1. I think this inevitably needs some code, but I'd be happy
to be told otherwise!
I have some code to handle OnSelectedIndexChanged for DDL1 that sets the
FilterExpression associated with the...
|
by: Larry Lard |
last post by:
In the old days (VB3 era), there was a thing called the Data Control,
and you could use it to databind controls on forms to datasources, and
so (as the marketing speak goes), 'create database applications without
writing a single line of code!!!'. Personally, and I know I wasn't
alone in this, I was always suspicious of this claim, because one
invariably ended up writing huge amounts of code attempting to get the
automagical thing to do...
| |
by: Steven Bolard |
last post by:
Hello,
I am trying to port my .net 1.1 application to 2.0. I am using vs2005. I am
trying to get my webservices to run and although i can compile them and and
get wsdl and service descriptions through internet explorer when hitting the
..asmx url, i cannot generate a proxy class to use in my winforms assembly.
When i try to generate a proxy, i get no error message but nor do i get a
reference.vb so there is no type info. If i then try...
|
by: =?Utf-8?B?QXNo?= |
last post by:
Hi,
I have an object, for example User. User contains various properties which i
have been able to bind to successfully using wizards and the form view.
However if the class User has a property which is not a string, for example
a custom type Address which contains properties such as StreetAddress, City,
County, Country etc how do i bind to those properties on the same form view?
I have tried doing Bind("Address.StreetAddress") but...
|
by: =?Utf-8?B?Si5NYXR0aGV3cw==?= |
last post by:
Picture the cut down scenario...
Say I have three datatables (Person, Address, Street) that are linked with
datarelation objects using the PK/FK associations...
Person
--------
PersonId {PK}
AddrId {FK}
Forename
|
by: Tom Gur |
last post by:
Hi,
What is early/late binding ?
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
| |
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |