fixed network socket bind, added port as a parameter for the packet functions