# FSocket Fails to Bind

**URL:** <https://forums.unrealengine.com/t/fsocket-fails-to-bind/476156>\
**Category:** Character & Animation\
**Tags:** sockets, bind, unreal-engine, question\
**Created:** [December 20, 2020, 1:16am UTC](https://forums.unrealengine.com/t/fsocket-fails-to-bind/476156 "2020-12-20T01:16:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Darkpyro2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Darkpyro2](https://forums.unrealengine.com/u/Darkpyro2)\
**Post date:** [December 20, 2020, 1:16am UTC](https://forums.unrealengine.com/t/fsocket-fails-to-bind/476156/1 "2020-12-20T01:16:04Z")

</div>

I am attempting to communicate between Unreal and another process using the FSocket socket programming API provided by Unreal. Here is my code:

```
//Networking configuration
	FIPv4Address ip(127, 0, 0, 1);
	Socket = ISocketSubsystem::Get(PLATFORM_SOCKETSUBSYSTEM)->CreateSocket(NAME_Stream, TEXT("default"), false);
	TSharedRef<FInternetAddr> addr = ISocketSubsystem::Get(PLATFORM_SOCKETSUBSYSTEM)->CreateInternetAddr();
	addr->SetIp(ip.Value);
	addr->SetPort(port);

	if (Socket->Bind(*addr)) {
		GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, TEXT("Bind Successful!"));

	}
	else {
		GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, TEXT("Bind Not Successful!"));
	}

```

The output generated is “Bind Not Successful!”, meaning that my call to Bind() is failing.

What could I be doing wrong here?

My intent is to listen on the loopback address. The selected port is 50323.
