Тема: IP в UDP
Показать сообщение отдельно
Старый 12.01.2006, 16:57   #1
Diplomat
Дэвелопер
 
Регистрация: 07.09.2005
Сообщений: 1,519
Написано 66 полезных сообщений
(для 164 пользователей)
Цитата из Хелпа, слегка поставившая меня в тупик:
SendUDPMsg udp_stream,dest_ip[,dest_port]

Parameters
udp_stream - UDP stream handle
dest_ip - destination IP address
dest_port (optional) - destination port number*

Description
Transmits all the data written to the UDP stream to the specified IP address and port. Data is written using the standard stream commands. If no destination port is specified, the port number used to create the UDP Stream is used.

Note that IP addresses must be in integer format, NOT in dotted IP format.
Тут как раз возникает неожиданный вопрос: ну и как перевести "точечный IP формат" в целое число?

P.S. "Интуитивный" метод- просто убрать точки- конечно же не работает. "Автоопределитель" АйПи, ф-я HostIP, возвращает в качестве моего номера число (-1062730740). Мой 213.179.233.126 это число напоминает мало...
(Offline)
 
Ответить с цитированием