As you'll need to write quite a bit of custom code, you'll want to have Flash Builder available. Note, however, there is a free SDK available that will allow you to do what you need, so you don't actually need it.
Here's the documentation on Flex 4's XMLSocket. Note that use of XMLSocket requires a policy file on the server that allows such a connection. Another option is to use Javascript through the External Interface API for those browsers that support it.
Depending on your widget, it may be useful to have Flash Pro, but it's not strictly necessary. Flex Builder does support building UI's and widgets. At worst, you'll just need to write the code for it.