Search:

Type: Posts; User: bean

Page 1 of 5 1 2 3 4

Search: Search took 0.38 seconds.

  1. Replies
    3
    Views
    108

    Re: convert bytebuffer to string

    k sorry this code works in case its is of use to anyone stupid mistake on my part i was feeding a null value into it oops
  2. Replies
    3
    Views
    108

    Re: convert bytebuffer to string

    i found that it was encoded and must be decoded so i tryed this


    public static void geturi(SocketChannel chan) throws CharacterCodingException{
    ByteBuffer buf=ByteBuffer.allocateDirect(64);...
  3. Replies
    3
    Views
    108

    convert bytebuffer to string

    i have a server and a client sends a string using printstream this stream is sent into a ByteBuffer and stored


    geturi(acceptedChannel);sending feed to geturi method below

    the dqata is stored...
  4. Thread: nio keys

    by bean
    Replies
    1
    Views
    82

    Re: nio keys

    static void loop() throws IOException{
    selector.selectNow();//returns 0 if no channels are ready but allways returns
    for (SelectionKey key : selector.selectedKeys()) {//get keys registered...
  5. Thread: nio keys

    by bean
    Replies
    1
    Views
    82

    nio keys

    k i have been reading about java nio servers and im a bit confused about keys. As i understand a client connects to my server and gets registered to a channel you then loop through the keys of...
  6. Replies
    2
    Views
    138

    Re: what is the benifit of ServerSocketChannel

    k this link on oracle website explains things quite well


    https://blogs.oracle.com/slc/entry/javanio_vs_javaio
  7. Replies
    2
    Views
    138

    Re: what is the benifit of ServerSocketChannel

    k found the answer socketserver is part of java io and is farly limited compared to java nio a channel is kinda like a thread started when a connection is made to the serversocket when using nio (I...
  8. Replies
    2
    Views
    138

    what is the benifit of ServerSocketChannel

    hi just wondering what is the difference between instansiating a ServerSocket and .accept(); and a ServerSocketChannel .accept();
    they both listen on a port for incoming connections so what is the...
  9. Replies
    7
    Views
    1,260

    Re: hello, help please

    web sites can see lots about your computer other that your ip address they can see your webbrowser,timezone,httpheaders,cookies etc there are many sites that will show you extactly what they see when...
  10. Replies
    2
    Views
    225

    [SOLVED] Re: why is socket closing

    k the problem was PS.close does not just close the PrintStream it closes the outputstream too the solution was to flush instead and output a switch string to break loop receiving data on server side....
  11. Replies
    2
    Views
    225

    [SOLVED] why is socket closing

    hi i have 2 methods one sends data to a server and the other handles the reponse. the first method sends data fine but the second throws Socket is closed



    public void checkcontacts() throws...
  12. [SOLVED] Re: JpcapCaptor.getDeviceList() returns empty array

    is this it


    http://jpcap.sourceforge.net/javadoc/
  13. Replies
    5
    Views
    327

    Re: hashmap returning null value

    k all i had to do was tell the sets that they were holding strings the following works


    HashMap<String,Integer>server=new HashMap();
    server.put("wahh",1233);
    server.put("nahh",1233);
    ...
  14. Replies
    5
    Views
    327

    Re: hashmap returning null value

    well thats the thing debugger doesint give allot of info


    Listening on 37607
    User program running
    User program finished

    the problem is iter.toString() returns...
  15. Replies
    5
    Views
    327

    hashmap returning null value

    hi i have 2 hashmaps i compare them to find common keys for which there is only one in below example i then want to print key and value from the server hashmap but for some reason it returns the key...
  16. Replies
    1
    Views
    177

    Re: how do you print lan ip address

    k found this on web and works for me. Apparently the code above works in most cases but if you have more than 1 interface then it can return loopback which is whats happening to me


    public...
  17. Replies
    1
    Views
    177

    how do you print lan ip address

    hi im trying to print my lan ip address ie(192.168.1.13) but this small piece of code is just printing localhost ie(127.0.0.1)what am i doing wrong ? im pretty sure i have used this code before and...
  18. Replies
    0
    Views
    148

    how to log reports on apache server?

    hi sorry if im posting in the wrong place but i have an apache server when someone connects to my server this is what happens
    1.the computer 192.168.1.3 send a request on port 3444 (example) to...
  19. Replies
    3
    Views
    203

    Re: ssh server throwing exception

    k but on in this part of code i am sending false data with T so why is it null on server?


    if(ptimestamp){
    command="T "+(_lfile.lastModified()/1000)+" 0";
    // The...
  20. Thread: Mina package

    by bean
    Replies
    2
    Views
    488

    Re: Mina package

    https://mina.apache.org/mina-project/downloads.html
  21. Replies
    3
    Views
    203

    ssh server throwing exception

    hi im writing an ssh server and client im using apache mina as the ssh deamon and jsch for the client
    but am getting a NumberFormatException on the server i think when transmitting the time from...
  22. Replies
    2
    Views
    316

    Re: IP camera programming

    dont think you need to write the app cos it is allready done its called motion works best on ubuntu its in the repos you can record from multiple ipcamers webcams anything you can save it as video or...
  23. Replies
    4
    Views
    203

    Re: how to create ssh server

    k in case its of use to others
    ssh is the command you use to connect to remote machines - the client.
    sshd is the daemon that is running and allows others to connect to the machine - the server. ...
  24. Replies
    4
    Views
    203

    Re: how to create ssh server

    ok sorry like i said noob im at the beginning here basically i have built a client for my android and can scp files to my debian openssh im looking to send these files to another android running...
  25. Replies
    4
    Views
    203

    how to create ssh server

    hi i was wondering if anyone could point me in the right direction of how to create a ssh server for my tomcat im a noob to this and am finding it hard to come by information which normally means im...
Results 1 to 25 of 101
Page 1 of 5 1 2 3 4