# Socket problem

**URL:** <https://forum.kirupa.com/t/socket-problem/303687>\
**Category:** flash\
**Created:** [January 25, 2010, 8:28am UTC](https://forum.kirupa.com/t/socket-problem/303687 "2010-01-25T08:28:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![grozavpaul](https://avatars.discourse-cdn.com/v4/letter/g/ec9cab/32.png) [@grozavpaul](https://forum.kirupa.com/u/grozavpaul)\
**Post date:** [January 25, 2010, 8:28am UTC](https://forum.kirupa.com/t/socket-problem/303687/1 "2010-01-25T08:28:17Z")

</div>

I am trying to connect to a server from a certain local port. Is this possible? As far as I know when i create a new connection i can specify the host and the port of the server that i am connecting to but the operating system will generate me a local port. Can I choose that local port? or at least find it’s value(without asking the server)?

I am trying to do this in flex but if it’s not possible and it is possible in flash that would be fine too.  
[RIGHT]Thank you !  
[/RIGHT]
