Rev 4 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4 | Rev 59 | ||
---|---|---|---|
Line 81... | Line 81... | ||
81 | } |
81 | } |
Line 82... | Line 82... | ||
82 | 82 | ||
83 | /****************** Section: private Methods ************************************************/ |
83 | /****************** Section: private Methods ************************************************/ |
84 | private void connect() |
84 | private void connect() |
85 | { |
- | |
- | 85 | { |
|
86 | 86 | System.out.println("trying to connect to" + mk_url); |
|
- | 87 | try{ |
|
- | 88 | connection = (StreamConnection) Connector.open(mk_url); |
|
87 | try{ |
89 | // old call |
88 | connection = (StreamConnection) Connector.open(mk_url, Connector.READ_WRITE); |
90 | // connection = (StreamConnection) Connector.open(mk_url, Connector.READ_WRITE); |
89 | reader=connection.openInputStream(); |
91 | reader=connection.openInputStream(); |
Line 90... | Line 92... | ||
90 | writer=connection.openOutputStream(); |
92 | writer=connection.openOutputStream(); |
91 | 93 | ||
Line 100... | Line 102... | ||
100 | } |
102 | } |
101 | catch (Exception ex) |
103 | catch (Exception ex) |
102 | { |
104 | { |
103 | // TODO difference fatal errors from those which will lead to reconnection |
105 | // TODO difference fatal errors from those which will lead to reconnection |
104 | msg="Problem connecting" + "\n" + ex; |
106 | msg="Problem connecting" + "\n" + ex; |
- | 107 | System.out.println("problem connecting " + ex); |
|
105 | } |
108 | } |
Line 106... | Line 109... | ||
106 | 109 |