import socket


def init_socket(port):
	"""
	Init socket at specified port. Listen for connections. 
	Return socket obj.
	
	Keyword arguments:
	port -- port at whicch to init socket (int)
	"""
	connection_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
	connection_socket.bind(('', port))
	connection_socket.listen(1)
	return connection_socket