Skip to content
This repository has been archived by the owner on Apr 29, 2021. It is now read-only.

Commit

Permalink
A bit of cleanup, prepare for 0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
matanlurey committed Dec 23, 2016
1 parent 4d5afe8 commit 47b22ea
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 0.3.0

- Use `WebSocketChannel` as the backing implementation for sockets
- Replace `sendX` and `close` methods to return `void` instead of `Future`

## 0.2.4-alpha

- Added `ReplaySeltzerHttp` and `SeltzerHttpRecorder` for testing
Expand Down
6 changes: 3 additions & 3 deletions lib/platform/browser.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import 'dart:async';
import 'dart:html';
import 'dart:typed_data';

import 'package:meta/meta.dart';
import 'package:seltzer/src/context.dart';
Expand All @@ -15,8 +14,9 @@ export 'package:seltzer/seltzer.dart';
/// This is appropriate for clients running in Dartium, DDC, and dart2js.
void useSeltzerInTheBrowser() {
setHttpPlatform(const BrowserSeltzerHttp());
setSocketPlatform((String url) =>
new ChannelWebSocket(new HtmlWebSocketChannel.connect(url)));
setSocketPlatform(
(String url) => new ChannelWebSocket(new HtmlWebSocketChannel.connect(url)),
);
}

/// An implementation of [SeltzerHttp] that works within the browser.
Expand Down
6 changes: 3 additions & 3 deletions lib/platform/vm.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import 'dart:async';
import 'dart:io';
import 'dart:typed_data';

import 'package:meta/meta.dart';
import 'package:seltzer/src/context.dart';
Expand All @@ -15,8 +14,9 @@ export 'package:seltzer/seltzer.dart';
/// This is appropriate for clients running in the VM on the command line.
void useSeltzerInVm() {
setHttpPlatform(const VmSeltzerHttp());
setSocketPlatform((String url) =>
new ChannelWebSocket(new IOWebSocketChannel.connect(url)));
setSocketPlatform(
(String url) => new ChannelWebSocket(new IOWebSocketChannel.connect(url)),
);
}

/// An implementation of [SeltzerHttp] implemented via the Dart VM.
Expand Down
2 changes: 0 additions & 2 deletions lib/src/context.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import 'dart:async';

import 'package:seltzer/src/interface.dart';

// The currently configured implementation of Seltzer.
Expand Down
5 changes: 1 addition & 4 deletions lib/src/interface/socket.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ import 'dart:async';
import 'dart:typed_data';

import 'package:seltzer/src/context.dart' as platform;

import 'package:seltzer/src/socket_impl.dart';
import 'package:stream_channel/stream_channel.dart';
import 'socket_message.dart';
import 'package:seltzer/src/interface/socket_message.dart';

/// Returns a connected [SeltzerWebSocket] to [url].
typedef SeltzerWebSocket SeltzerWebSocketProvider(String url);
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: seltzer
version: 0.3.0-alpha
version: 0.3.0
description: An elegant and rich cross-platform HTTP library for Dart.
authors:
- Matan Lurey <[email protected]>
Expand Down

0 comments on commit 47b22ea

Please sign in to comment.