| 
			
			 | 
		#1 | 
| 
			
			 Участник 
		
			
	 | 
	
	
	
		
		
			
			
			Соединение с TCP сервером
			 
			
			Здравствуйте! 
		
		
		
		
		
		
		
	Не могбы ли бы вы подсказать, как можно сделать soket connection с ТСР сервером, мне сказали что это не сложно и в туториале есть, но я не нашел   в туториале.Вообще задача стоит соединиться с ТСР сервером отправить запрос потоком в XML формате и получить ответ потоком XML формате.  | 
| 
	
 | 
| 
			
			 | 
		#2 | 
| 
			
			 Участник 
		
			
	 | 
	
	
	
		
		
		
		 
			
			Нашел в каком направлении искать. 
		
		
		
		
		
		
		
	В Axapte 4 отсуствует tutorial_TicTacToy (крестики нолики) X++: static void CreateConnection(Args _args) { #Socks Dll dll; DllFunction dllConnect; DllFunction dllSocket; DllFunction dllPort; DllFunction dllHost; anytype socketValue; anytype retVal; int host; anytype port; InteropPermission perm; int intPort,socket ; ; perm = new InteropPermission(InteropKind::DllInterop); perm.assert(); dll = new Dll("Ws2_32.dll"); CodeAccessPermission::revertAssert(); if (dll != null) { perm = new InteropPermission(InteropKind::DllInterop); // Grants permission to execute the DLLFunction.new method. // DLLFunction.new runs under code access security. perm.assert(); dllConnect = new DllFunction(dll, "connect"); dllSocket = new DllFunction(dll,"socket"); dllPort = new DllFunction(dll,"htons"); dllHost = new DllFunction(dll,"inet_addr"); dllSocket.arg(ExtTypes::DWord,ExtTypes::DWord,ExtTypes::DWord); dllSocket.returns(ExtTypes::DWord); socket = dllSocket.call(#AF_INET,#SOCK_STREAM,#IPPROTO_IP); if (dllHost!=null){ dllHost.arg(ExtTypes::String); dllHost.returns(ExtTypes::DWord); host = dllHost.call("127.0.0.1"); } if (dllPort!=null){ dllPort.arg(ExtTypes::Pointer); dllPort.returns(ExtTypes::String); port = dllPort.call(intPort); } if (dllConnect != null) { dllConnect.returns(ExtTypes::DWord); retVal = dllConnect.call(); } // Closes the code access permission scope. CodeAccessPermission::revertAssert(); } X++: // The sockaddr_in structure specifies the address family, // IP address, and port of the server to be connected to. sockaddr_in clientService; clientService.sin_family = AF_INET; clientService.sin_addr.s_addr = inet_addr( "127.0.0.1" ); clientService.sin_port = htons( 27015 );  | 
| 
	
 |