Exemplo n.º 1
0
CPrivateChatFrame* CChatWindows::OpenPrivate(GGUID* pGUID, IN_ADDR* pAddress, WORD nPort, BOOL bMustPush, PROTOCOLID nProtocol, IN_ADDR* pServerAddress, WORD nServerPort)
{
	SOCKADDR_IN pHost;
	
	pHost.sin_family	= PF_INET;
	pHost.sin_addr		= *pAddress;
	pHost.sin_port		= htons( nPort );

	if ( pServerAddress == NULL )
		return OpenPrivate( pGUID, &pHost, bMustPush, nProtocol, NULL );

	SOCKADDR_IN pServer;

	pServer.sin_family	= PF_INET;
	pServer.sin_addr	= *pServerAddress;
	pServer.sin_port	= htons( nServerPort );
	
	return OpenPrivate( pGUID, &pHost, bMustPush, nProtocol, &pServer );
}
Exemplo n.º 2
0
CPrivateChatWnd* CChatWindows::OpenPrivate(const Hashes::Guid& oGUID, const IN_ADDR* pAddress, WORD nPort, BOOL bMustPush, PROTOCOLID nProtocol, IN_ADDR* pServerAddress, WORD nServerPort)
{
	SOCKADDR_IN pHost = {};

	pHost.sin_family	= PF_INET;
	pHost.sin_addr		= *pAddress;
	pHost.sin_port		= htons( nPort );

	if ( pServerAddress == NULL )
		return OpenPrivate( oGUID, &pHost, bMustPush, nProtocol, NULL );

	SOCKADDR_IN pServer = {};

	pServer.sin_family	= PF_INET;
	pServer.sin_addr	= *pServerAddress;
	pServer.sin_port	= htons( nServerPort );

	return OpenPrivate( oGUID, &pHost, bMustPush, nProtocol, &pServer );
}