angel-dart-archive / websocket

moved to angel-dart/angel/packages/websocket
https://github.com/angel-dart/angel/tree/master/packages/websocket
MIT License
15 stars 3 forks source link

WebSocketController doesnt inject websocket events #51

Closed sanketwarule closed 6 years ago

sanketwarule commented 6 years ago

I am new to the dart as well as angel websocket, I want to make a websocket demo for handling events, I followed your "from scrath tutorial " but didnt succeed. Please help me to find out the issue in following code. The websocket event is not triggered.

Server file.. server.txt

lib/angel_hello file.. angel_hello.txt

test/websocket_test file.. websocket_test.txt

pubspec.yaml file... pubspec.txt

Please give me a simple demo working code for angel websocket if possible

thosakwe commented 6 years ago

Apologies, hadn't seen this before. The Angel from Scratch tutorial is now quite outdated, as it is from only about two months after when Angel 1.0.0 was released. I will need to release an updated version sooner or later.

Many things have changed.

Can you put project on Github so that I can see what might be wrong?

In the meantime, I'll close the issue itself, as it's not a bug report.

sanketwarule commented 6 years ago

Hi dear friend, I have uploaded the project on github, please check it in your meantime. If anything is wrong then please forgive me I am new to this dart and trying to make the apps in flutter. Below is the link to clone the repository...

git@github.com:sanketwarule/FeedServer.git

On Tue, Aug 7, 2018 at 1:10 AM, Tobe Osakwe notifications@github.com wrote:

Apologies, hadn't seen this before. The Angel from Scratch tutorial is now quite outdated, as it is from only about two months after when Angel 1.0.0 was released. I will need to release an updated version sooner or later.

Many things have changed.

Can you put project on Github so that I can see what might be wrong?

In the meantime, I'll close the issue itself, as it's not a bug report.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/angel-dart/websocket/issues/51#issuecomment-410828815, or mute the thread https://github.com/notifications/unsubscribe-auth/AlrwdHUQMFZsQ3hgaYw1Ol7YkU8KrVI5ks5uOJukgaJpZM4VmPmB .

-- Thanks, Sanket Warule +917709777170

thosakwe commented 6 years ago

One thing - change your app.configure calls to await app.configure. I'm trying to figure out why your setup wouldn't work - it all looks good to me.

thosakwe commented 6 years ago

Also, a note: Flutter doesn't support dart:mirrors, but Angel makes use of it. You can't run Angel within Flutter; you'll need the standalone Dart VM. That might be your issue?

sanketwarule commented 6 years ago

As said I have changed to await app.configure.... but then also it gives me the same output..

below is my output

00:00 +0: boats {"id":null,"eventName":"test","data":null,"params":null} {"id":null,"eventName":"get_boat","data":null,"params":null}

On Tue, Aug 7, 2018 at 4:08 PM, Tobe Osakwe notifications@github.com wrote:

Also, a note: Flutter doesn't support dart:mirrors, but Angel makes use of it. You can't run Angel within Flutter; you'll need the standalone Dart VM. That might be your issue?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/angel-dart/websocket/issues/51#issuecomment-411013588, or mute the thread https://github.com/notifications/unsubscribe-auth/AlrwdG8X1WPbsCYLynTY0UMXQOaUcKXZks5uOW5BgaJpZM4VmPmB .

-- Thanks, Sanket Warule +917709777170

sanketwarule commented 6 years ago

Previously I have used socket.io but it is not supported for flutter, so I am migrating towards angel framework which can be used in client side as well as server side. So in my flutter application will angel framework will work or not?

My motto of this project is to create the realtime server e.g. Stocks Market using websockets. A random numbers (stock price) will be generated and will be broadcasted over the websockets to client (client is the mobile application built using flutter). I followed your tutorials, it is very worth-full and explained very nicely.

Thank you for your valuable time.

On Tue, Aug 7, 2018 at 4:58 PM, sanket warule warulesanket@gmail.com wrote:

As said I have changed to await app.configure.... but then also it gives me the same output..

below is my output

00:00 +0: boats {"id":null,"eventName":"test","data":null,"params":null} {"id":null,"eventName":"get_boat","data":null,"params":null}

On Tue, Aug 7, 2018 at 4:08 PM, Tobe Osakwe notifications@github.com wrote:

Also, a note: Flutter doesn't support dart:mirrors, but Angel makes use of it. You can't run Angel within Flutter; you'll need the standalone Dart VM. That might be your issue?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/angel-dart/websocket/issues/51#issuecomment-411013588, or mute the thread https://github.com/notifications/unsubscribe-auth/AlrwdG8X1WPbsCYLynTY0UMXQOaUcKXZks5uOW5BgaJpZM4VmPmB .

-- Thanks, Sanket Warule +917709777170

-- Thanks, Sanket Warule +917709777170

thosakwe commented 6 years ago

Well, the application will work, but here are notes on the correct structure:

In the meantime, I will have to re-run the tests in Travis to make sure everything is working correctly. I've just downloaded Dart 2.0.0, so I can finally reliably predict Travis outputs without having to install so many versions of Dart.

sanketwarule commented 6 years ago

Thank you so much dear friend,

Just help me out in this feedserver application. The output is not coming as expected even writting the await before the app.configure...

Output:

00:00 +0: boats {"id":null,"eventName":"test","data":null,"params":null} {"id":null,"eventName":"get_boat","data":null,"params":null}

expected output:

it should print the

{'model': 'cx9'}

or

'test'.

On Tue, Aug 7, 2018 at 6:00 PM, Tobe Osakwe notifications@github.com wrote:

Well, the application will work, but here are notes on the correct structure:

In the meantime, I will have to re-run the tests in Travis to make sure everything is working correctly. I've just downloaded Dart 2.0.0, so I can finally reliably predict Travis outputs without having to install so many versions of Dart.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/angel-dart/websocket/issues/51#issuecomment-411039194, or mute the thread https://github.com/notifications/unsubscribe-auth/AlrwdJkyYS4ofLlM8b-CCJHSr0-jI45vks5uOYhPgaJpZM4VmPmB .

-- Thanks, Sanket Warule +917709777170

thosakwe commented 6 years ago

Going to clone your project now and get to the bottom of this. Sorry for any inconvenience!

sanketwarule commented 6 years ago

Thank you dear

On Tue, Aug 7, 2018 at 6:30 PM, Tobe Osakwe notifications@github.com wrote:

Going to clone your project now and get to the bottom of this. Sorry for any inconvenience!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/angel-dart/websocket/issues/51#issuecomment-411047430, or mute the thread https://github.com/notifications/unsubscribe-auth/AlrwdBUufrxlUcRXdLYE38-pWkC39kt8ks5uOY9vgaJpZM4VmPmB .

-- Thanks, Sanket Warule +917709777170

sanketwarule commented 6 years ago

Hi Tobe Sir, Sending this mail just to remind you that you have not given me the solution yet, please try to help me in your free time as soon as possible. I am waiting for your response.

On Wed, Aug 8, 2018 at 10:50 AM, sanket warule warulesanket@gmail.com wrote:

Thank you dear

On Tue, Aug 7, 2018 at 6:30 PM, Tobe Osakwe notifications@github.com wrote:

Going to clone your project now and get to the bottom of this. Sorry for any inconvenience!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/angel-dart/websocket/issues/51#issuecomment-411047430, or mute the thread https://github.com/notifications/unsubscribe-auth/AlrwdBUufrxlUcRXdLYE38-pWkC39kt8ks5uOY9vgaJpZM4VmPmB .

-- Thanks, Sanket Warule +917709777170

-- Thanks, Sanket Warule +917709777170