I am trying to access a function on a server, that function that has 2 parameters
first the the function name that server should callback on client
and other is client IP i.e 10.0.4.33:4542
what do i have to do on client side so that server calls a method on my client.
I have no control over server, it up there providing it services
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
To the best of my understanding, you have to have two sets of server-client pairs to do what you're trying to do.
Setup:
- Client 1 and Server 2 are on machine X
- Server 1 and Client 2 are on machine Y
Client 1 sends request to Server 1.
Server 1 calls object.function() which is part of Client 2 --> that means Client 2 issues a call to Server 2
X ----Client1 ---> Server1 ---Y
|
|
X ----Server2 <----Client2 -Y
Hope this helps...
Pete
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
if function on server is taking function name(running at client) as an argument, thn this means server should have a way of calling that method.
Now the question is, the only solution possible is the way you have recommended ?
or there could be other ways also
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The server's only job is to listen for incoming requests and execute callbacks.
If you can register a callback that goes out and does something over the network, then that's your answer.
Good luck!
Pete
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am trying to access a function on a server, that function that has 2 parameters
first the the function name that server should callback on client
and other is client IP i.e 10.0.4.33:4542
what do i have to do on client side so that server calls a method on my client.
I have no control over server, it up there providing it services
To the best of my understanding, you have to have two sets of server-client pairs to do what you're trying to do.
Setup:
- Client 1 and Server 2 are on machine X
- Server 1 and Client 2 are on machine Y
Client 1 sends request to Server 1.
Server 1 calls object.function() which is part of Client 2 --> that means Client 2 issues a call to Server 2
X ----Client1 ---> Server1 ---Y
|
|
X ----Server2 <----Client2 -Y
Hope this helps...
Pete
Just to clarify the ASCII pic -- the two vertical lines should NOT be connecting X, they SHOULD be connecting Y.
thanks for such a quick response
i will try it out
again thanks alot
yeah i forgot to mention that i have no control over the server i cannot change it
what are my options than
if function on server is taking function name(running at client) as an argument, thn this means server should have a way of calling that method.
Now the question is, the only solution possible is the way you have recommended ?
or there could be other ways also
The server's only job is to listen for incoming requests and execute callbacks.
If you can register a callback that goes out and does something over the network, then that's your answer.
Good luck!
Pete
thanks
sorry for bugging you again
but I dont know much about C++ so I am a newbie
can you provide a sample code that how can i register a callback
Thanks
psipika you were right
i had to make server at client's end and it did work
thanks
if anybody needs help he/she can contact me or I i will post sample code later
go to run