getnamo / TCP-Unreal

Convenience TCP wrapper for Unreal Engine
MIT License
106 stars 36 forks source link

I need to get sender IP #2

Closed ghost closed 5 years ago

ghost commented 5 years ago

I want to response from dedicated server to client, but I don't know about client information. so I send something to server then, I want to send to client. do you know some method?please tell me... I thought Client of "On Client Connected(TCPServer)" is Client IP Address, but it was my server IP Address;;; please;;; sry with my but English. from Japan

getnamo commented 5 years ago

Note to self: seems like https://github.com/getnamo/tcp-ue4/blob/master/Source/TCPWrapper/Private/TCPServerComponent.cpp#L55 is the incorrect address, need to see if the ListenSocket has a different address which is the client one that connects.

ghost commented 5 years ago

sry, What should I do?I need to get client IP in 4.21 dedicated server. I don't know about C++

getnamo commented 5 years ago

I'll make a new release today which should hopefully have a fix

getnamo commented 5 years ago

addressed in https://github.com/getnamo/tcp-ue4/commit/d2007604d716b87c161873679a0a985eaba7c82a released as https://github.com/getnamo/tcp-ue4/releases/tag/0.5.0, grab release to test

ghost commented 5 years ago

Thank You! Can it use on 4.21?

getnamo commented 5 years ago

if you convert your blueprint only project to a mixed project (see https://allarsblog.com/2015/11/04/converting-bp-project-to-cpp/) then you can recompile it for 4.21

ghost commented 5 years ago

Thank you I did it! but, I can success only "127.0.0.1", when do I connect from other IP, it will fail. I think "Start Listen Server" node is not working. because when I connect to other IP and PC to Server, it will timeout. Do you know some solution?

getnamo commented 5 years ago

check that the host is reachable: https://check-host.net/?lang=en you may need to open your firewall and forward ports

ghost commented 5 years ago

Thank you!