Re: SocketChannel.write(ByteBuffer src) problem



On May 24, 3:45 am, Daniele Futtorovic <da.futt.n...@xxxxxxxxxxxxxxx>
wrote:
On 2008-05-24 12:27 +0100, technodolt allegedly wrote:

Nope.  Using getKeyCode().

And what are you doing with that value?

if(e.getKeyCode() == KeyEvent.VK_ENTER)

As I said, it works fine when using keyReleased, it just doesn't work
when using keyPressed.

With the /exact/ same data?

I'm using a class that extends KeyAdapter. I can literally change
ONLY the name of the method I'm overriding, leaving all other code
completely, 100% identical, and use the exact same data to send, and
it works with keyReleased, and not with keyPressed.
If I was using getKeyChar(), it wouldn't work for either of them.

If your problem persists, wouldn't it be worth your while to consider
using getKeyChar() on KEY_TYPED events?

I can't use KeyTyped/getKeyChar because I'm processing on enter...
doesn't have an associated character, and therefore can only be caugh
with Released/Pressed.

And it still recognizes the key press... other code inside the
listener still fires off when you hit enter.  The only line that
isn't working is the SocketChannel.write call.  It doesn't throw any
exceptions, it returns the correct value as though it were writing,
the value is just never actually sent through the socket.
a) I'm also pulling the exact same data into a byte array and then
using a message dialog to show me a string created from that byte
array. b) With the telnet server I'm using, if it sent anything _at
all_, I would get a response back.  I'm getting no response, and then
getting my connection dropped due to inactivity.

All this put together sounds very odd, and as such rather unlikely -- if
you'll forgive the scepticism.

Not a problem. I spent an hour plus trying to debug this earlier and
going "This just doesn't make ANY sense", so I had a healthy dose of
skepticism myself. I finally thought it would be better to get
outside input than keep poking at it, in case I'm missing something
obvious.

--
DF.
to reply privately, change the top-level domain
in the FROM address from "invalid" to "net"

.



Relevant Pages

  • Re: Remoting Server works on dev machine but not on server
    ... I am having the exact same issue it seems. ... the object contains an array of other objects of type ... waits for a response for about 60 seconds, ... underlying connection was closed: Unable to connect to the remote ...
    (microsoft.public.dotnet.framework.remoting)
  • RIAA filters, was Re: Stability in Feedback Amplifiers, Part Deux-A
    ... On page 526 of "Valve Amplifiers", the following formulas for the network ... Jones claims these formulas are exact. ... If you have a known accurate reverse eq network and reliable flat signal ... until the desired flat preamp response is achieved. ...
    (rec.audio.tubes)
  • Re: Use VB array as as argument for worksheet function
    ... to me that he knew what an array is. ... why would the replier not see the response. ... (there's no email, no snail mail, but somewhere should be gmail in my addy) ... should be teaching the Newbie, ...
    (microsoft.public.excel.programming)
  • Re: speed up calculation suggestions
    ... you should access the array like so, ... By exact, I meant that we need to reproduce the exact logic deployed ... our calculations are correct. ... One could probably reasonably duplicate this through some ...
    (comp.lang.fortran)
  • array deserialization in Axis webservice repsonses
    ... The web response has the following schema: ... public string thingy1; ... i.e. the response has an array of custom objects within a custom object. ... are deserialization issues with certain elements. ...
    (microsoft.public.dotnet.framework.webservices)