# Where can I find the implementation for FSocket.Send(...)?

**URL:** <https://forums.unrealengine.com/t/where-can-i-find-the-implementation-for-fsocket-send/392667>\
**Category:** Multiplayer & Networking\
**Tags:** Networking, sockets, unreal-engine, UE4, CPP, question\
**Created:** [May 4, 2017, 7:25am UTC](https://forums.unrealengine.com/t/where-can-i-find-the-implementation-for-fsocket-send/392667 "2017-05-04T07:25:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![infected.digital](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@infected.digital](https://forums.unrealengine.com/u/infected.digital)\
**Post date:** [May 4, 2017, 7:25am UTC](https://forums.unrealengine.com/t/where-can-i-find-the-implementation-for-fsocket-send/392667/1 "2017-05-04T07:25:18Z")

</div>

Hey there,

I recently played with a re-post I found here:

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — ue4community.wiki! You will be able to find content from the official...

I have a problem in understanding, how to use this line:

```
bool successful = Socket->Send((uint8*)TCHAR_TO_UTF8(serializedChar), size, sent);

```

I setup a listening TCP client very close to this one:  
[A new, community-hosted Unreal Engine Wiki - Announcements - Unreal Engine Forums](https://wiki.unrealengine.com/TCP_Socket_Listener),_Receive\_Binary\_Data\_From\_an\_IP/Port\_Into\_UE4,_(Full\_Code\_Sample)

The sending was initially done via a small python script, which was working like a charm. Now trying to have an UE4 Scene sending via FSocket is sadly leading nowhere at the moment, since I found, that its implementation looks like this:

UE\_4.15/Engine/Source/Runtime/Sockets/Private/Sockets.cpp like 19:

```
bool FSocket::Send(const uint8* Data, int32 Count, int32& BytesSent)
{
//	NETWORK_PROFILER(GNetworkProfiler.TrackSocketSend(this,Data,BytesSent));
	UE_LOG(LogSockets, Verbose, TEXT("Socket '%s' Send %i Bytes"), *SocketDescription, BytesSent );
	return true;
}

```

So my code runs like it should, but without any logic actually sending my data anywhere, it will never work ☹

Could anybody please give me a hint, how I can setup a TCP connection and SEND data, instead of just calling an empty method? Or is there an implementation somewhere else and I don’t see it? It looks like, there is something here, I completely don’t understand…

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_61b4a355](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_61b4a355](https://forums.unrealengine.com/u/anonymous_user_61b4a355)\
**Post date:** [May 4, 2017, 6:27pm UTC](https://forums.unrealengine.com/t/where-can-i-find-the-implementation-for-fsocket-send/392667/2 "2017-05-04T18:27:46Z")

</div>

Hello,

When you call:

```
FSocket* Socket = ISocketSubsystem::Get(PLATFORM_SOCKETSUBSYSTEM)->CreateSocket

```

You are asking for a platform specific version of a FSocket. My guess is the FSocket::Send( ) isn’t the actual function being used when you get the socket. In visual studio, put a break point at:

```
bool successful = Socket->Send((uint8*)TCHAR_TO_UTF8(serializedChar), size, sent);

```

Then, debug through and jump into which Send( ) it’s actually using. If it is using the FSocket::Send and effectively not sending anything, write up a bug report in the Bug Reports section.
