# Socket programming

**URL:** <https://community.unix.com/t/socket-programming/263842>\
**Category:** UNIX for Advanced & Expert Users\
**Created:** [April 14, 2010, 8:14am UTC](https://community.unix.com/t/socket-programming/263842 "2010-04-14T08:14:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gopi\_Krishna\_P](https://community.unix.com/letter_avatar/gopi_krishna_p/32/6_449c533f586939b6e5f246632a46421f.png) [@Gopi\_Krishna\_P](https://community.unix.com/u/Gopi_Krishna_P)\
**Post date:** [April 14, 2010, 8:14am UTC](https://community.unix.com/t/socket-programming/263842/1 "2010-04-14T08:14:01Z")

</div>

my socket program is not working with larger port numbers like more than 60000 , any reason why ?

---

<div class="post-metadata">

**Author:** ![pludi](https://community.unix.com/user_avatar/community.unix.com/pludi/32/1278_2.png) [@pludi](https://community.unix.com/u/pludi)\
**Post date:** [April 14, 2010, 8:38am UTC](https://community.unix.com/t/socket-programming/263842/2 "2010-04-14T08:38:18Z")

</div>

Unless you give more details, I'll assume you mean port numbers \> 65535. The reason is simply that the port field in the TCP and UDP header is a 16 bits wide, allowing a port range from 0 to 65535 (0 to 2^16-1).

---

<div class="post-metadata">

**Author:** ![Gopi\_Krishna\_P](https://community.unix.com/letter_avatar/gopi_krishna_p/32/6_449c533f586939b6e5f246632a46421f.png) [@Gopi\_Krishna\_P](https://community.unix.com/u/Gopi_Krishna_P)\
**Post date:** [April 14, 2010, 8:42am UTC](https://community.unix.com/t/socket-programming/263842/3 "2010-04-14T08:42:41Z")

</div>

i used 60050 , socket binding is happening , recvfrom is not recieving any message , even though i sent a message to that address(ip, port)

---

<div class="post-metadata">

**Author:** ![pludi](https://community.unix.com/user_avatar/community.unix.com/pludi/32/1278_2.png) [@pludi](https://community.unix.com/u/pludi)\
**Post date:** [April 14, 2010, 8:46am UTC](https://community.unix.com/t/socket-programming/263842/4 "2010-04-14T08:46:00Z")

</div>

OK, there are two ways we could go on here:

1. We continue this question/answer game for a couple dozen posts, with you always answering under the assumption that everyone has the exact same system and problem as you have, and that it should be obvious what you mean OR
2. you give us some details to work upon: OS, version, programming language, code, error codes and messages, ... the works

---

<div class="post-metadata">

**Author:** ![Gopi\_Krishna\_P](https://community.unix.com/letter_avatar/gopi_krishna_p/32/6_449c533f586939b6e5f246632a46421f.png) [@Gopi\_Krishna\_P](https://community.unix.com/u/Gopi_Krishna_P)\
**Post date:** [April 15, 2010, 9:37am UTC](https://community.unix.com/t/socket-programming/263842/5 "2010-04-15T09:37:04Z")

</div>

hi thanks,

it is working fine..  
my testing has some issue ..
