Created
          September 20, 2016 22:27 
        
      - 
      
- 
        Save lachenmayer/50f4d401f20941a3048d6a85104561ee to your computer and use it in GitHub Desktop. 
    pull-ws-bug
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | const connect = require('pull-ws/client') | |
| const pull = require('pull-stream') | |
| const {source} = connect('ws://localhost:1337', (err, stream) => { | |
| pull( | |
| stream, | |
| pull.log() | |
| ) | |
| // expected: log 'hello!' | |
| // actual: stream is undefined | |
| }) | |
| // pull( | |
| // source, | |
| // pull.log() | |
| // ) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | const createServer = require('pull-ws/server') | |
| const pull = require('pull-stream') | |
| createServer(stream => { | |
| pull( | |
| pull.once('hello!'), | |
| stream | |
| ) | |
| }).listen(1337) | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment