Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ MT-multithreading and servers » How to send msg to specific IP ?
Re: How to send msg to specific IP ? [message #23119 is a reply to message #23114] Thu, 17 September 2009 19:57 Go to previous messageGo to previous message
MohamedMonem is currently offline  MohamedMonem
Messages: 7
Registered: March 2009
Promising Member
luzr wrote on Thu, 17 September 2009 17:27

MohamedMonem wrote on Thu, 17 September 2009 04:45

Hello all,

I made a simple server-client application and the server can accept many clients every time I extract the IP of each client, now how can I Send Msg to specific IP ?!!

Thanks in advance.


Do you use 'accept' classics?


Could you explain more what is 'accept' classics ?

this is what i do
void App::AcceptClients()
{
	while(m_listener.IsOpen())
	{
		Socket TempSocket;
		dword ClientIp;
		if(!m_listener.IsError() && m_listener.Accept(TempSocket, &ClientIp))
		{
			String Ip = FormatIP(ClientIp);
			m_clients[Ip] = TempSocket;
		}
	}
}


m_clients is map<String, Socket, less<String> >

I tried to store socket for each client but this failed I get this error.

Quote:


rror C2558: class 'Upp::Socket' : no copy constructor available or c
opy constructor is declared 'explicit'



I think there are some way to send Msg to specific IP, I can easily store IPs.

thanks in advance.

[Updated on: Thu, 17 September 2009 19:58]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Port giFT (a great but abandoned P2P project) to U++?
Next Topic: GuiLock Example broken
Goto Forum:
  


Current Time: Mon Jul 07 13:27:07 CEST 2025

Total time taken to generate the page: 0.03804 seconds