When debugging websocket messages, in chrome developer tool.
I can see normal data messages (similar as in here). But after close the connection (e.g normally), can't see the close msg, (though I did saw & print the msg via onclose handlers in client program).
Thus seems control msg is not show?
So, is there anyway to see close msg (and optionally ping/pong msg) in chrome developer tool?
Or I must use tools like wireshake or postman?
Related
When you use the Maiar Exchange with the Chrome Extension and send a transaction, you can see that the extension window automatically closes after sending the transaction.
When I implement the same behavior, the Extension window stays open and the sendTransaction() Promise only resolves after the call is done. If I close the window by myself by clicking somewhere else on the website, I get the following error in the console:
Uncaught (in promise) Extension window was closed without response.
With that error, my promise success resolving code is not executed anymore which basically forces the user to wait about 30 seconds until the transaction is done.
This happens when using the sendTransaction() method of the ExtensionProvider from erdjs.
Does anyone have an explanation how e.g. the Maiar Exchange solves this?
The way the Maiar Exchange handles this is slightly different from your approach.
Sending the transaction directly with the ExtensionProvider requires that the extension window stays open until it is finished to return you the result.
However if you only use the ExtensionProvider to sign the transaction using the signTransaction method and send it yourself via the ProxyProvider you won't run into this limitation. The signing is basically instant and quickly closes the extension window. It also allows you to retry sending, without user interaction, if you run into any timeouts or similar.
so for instance, this is difficult to explain but i will try to my best ability.
if you refresh a page on for instance a discord channel, an ajax request is sent to:
https://discord.com/api/v8/channels/channelidhere/messages?limit=50
which gets the last 50 messages sent in the channel. now, interestingly enough, if youre in a channel with lots of new messages being sent the netwrok tab does not update as if there were no requests associated with the channel messages being updated. ive seen this happen with other sites in similar ways and im just curious as to what i may be missing, is there some reason a request would be sent that the network tab doesnt catch? ps: even if i go to the all tab which supposedly captures all requests still no bueno.
It's common that chat website use websockets instead of http to communicate.
maybe this will help you How do you inspect websocket traffic with Chrome Developer Tools?
Is there a way in windows phone to track sent message event? i mean to say that whenever a message is sent then a function of my application execute
all i want is to execute a function whenever sent message button of windows phone is clicked?
If you open the message launcher (I don't remember the exact name), it'll open this screen and you have the event (something like application deactivated) and once the user sends the message, the screen should close and come back to your app (again another event is available at that point, activated).
So you'll have to play with the events to do something you like, IIRC there is no call back when the message button is clicked.
Here's a link with the lifecycle of apps
There is no API that notifies you if a message was sent (at least no open API). A similar question was asked here.
I'm using the code from this article, with phonegap app.
http://blogs.msdn.com/b/glengordon/archive/2011/12/02/phonegap-on-wp7-tip-3-sending-sms-and-intro-to-plugins.aspx
The plugin works all fine, but when the SMS is sent, I want to return to my app automatically. Is this possible? If its possible to send an SMS without go to the default integrated sender, it could be even better.
I'm a newbie to C# and windows phone apps - please help me ;)
there is no way to avoid the integrated SMS sender due to security reasons. User will return to your app after hitting the Back button on the SMS conversation page (that is esured automatically because of the stack-controlled nature of paging in WP7, but will not return after hitting the home button (again, this behavior cannot be prevented in any way) and your app will be suspended (possible to return to it by holding the back button and choosing it).
I'm trying to develop J2ME SMS applications (on Symbian, but that's not important).
I tried with the simplest app that sends a SMS when it receives one.
It is completely based on the example provided by JSR-205:
The base class is made implementing MessageListener.
Then the following methods are implemented (I left out all try/catch for simplicity).
I have two problems:
it doesn't work
I don't know how to debug it in Netbeans7.1
In particular I'm interested in an answer to the second question: how can I emulate an SMS reception in Netbeans7.1 in order to set a breakpoint in notifyIncomingMessage method?
public class Example extends MIDlet implements MessageListener {
public void startApp() {
messconn = (MessageConnection)Connector.open("sms://:6222");
messconn.setMessageListener(this);
reader = new Reader();
new Thread(reader).start();
}
public void notifyIncomingMessage(MessageConnection conn) {
conn = (MessageConnection)Connector.open("sms://+39xxxyyyyyyyy");
TextMessage msg = (TextMessage)conn.newMessage("Hello");
conn.send(msg);
}
}
class Reader implements Runnable {
public void run() {
wait();
}
}
The J2ME Wireless Toolkit 2.0 supports WMA 1.1, allowing application developers to easily emulate sending and receiving SMS and CBS messages between multiple device emulators based on MIDP 2.0.So you can use The J2ME Wireless Toolkit WMA Console.
The console emulates a simple wireless messaging device. Each console instance - you can run more than one console at a time - is identified in its title bar by a unique number, referred to as its phone number to reflect the way a real device works. The first console is assigned the number 5550000 by default. If you immediately open a second console, it is assigned the number 5550001, and so on.
To use the console, start the toolkit's Preferences application, choose the API Availability tab, and make sure that the Wireless Messaging API is checked. Now run the Utilities application and on the right side of the window press the Open Console button. (You can also get to the Preferences and Utilities applications from menu items in the KToolbar application.)
To send a message from a console, press either the Send SMS or Send CBS button. The resulting dialog has two pages, one for text messages and one for binary messages. The SMS dialog lists the numbers of all console and emulator instances (collectively referred to as clients) currently running. Select the desired clients, enter the port number to which the message is to be sent, and either type the text message or select the binary file you want to send, then press the Send button. The CBS dialog is a bit simpler since the message will be broadcast to all known clients - supply a message identifier (a number) and the text or file to send, and press the Send button.
The console's main window lists the messages it sends and receives. You can use two console instances to chat with yourself, but it's much more interesting to involve an application in the conversation, so that you can verify that the application is sending and receiving messages correctly.
EDIT1:
In netbeans you can start WMA console from Tools | Java Platform | | Tools & Extensions | Open Utilities. Note that not all SDKs support this.On the other hand Go to your J2ME platform installed directory and search for some files look like utils.exe then double click on it.
EDIT2:
If you have problem yet,you can try other platforms.I have sony ericsson sdk 2.5.0.6 and it is easily to find "utils.exe" in it's installed directory.
You can see good tutorials and notes in references.
References:
Mobile P2P messaging, Part 1
The Wireless Messaging API
The J2ME Wireless Toolkit WMA Console
tebyan.net