Skip to content

Commit

Permalink
Merge pull request #26 from Loophole-Labs/staging
Browse files Browse the repository at this point in the history
Merging Staging into Master for v0.1.2 release
  • Loading branch information
ShivanshVij committed Jun 15, 2021
2 parents 8f7497e + f772045 commit 50e348c
Show file tree
Hide file tree
Showing 11 changed files with 519 additions and 173 deletions.
49 changes: 0 additions & 49 deletions .chglog/CHANGELOG.tpl.md

This file was deleted.

27 changes: 0 additions & 27 deletions .chglog/config.yml

This file was deleted.

30 changes: 23 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,32 @@
<a name="unreleased"></a>
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [v0.1.2] - 2021-06-14
### Features
- Adding `Write`, `Read`, `WriteTo`, and `ReadFrom` functionality to `frisbee.Conn` to make it compatible with `io.Copy`
functions

### Fixes
- Improving README.md with public build status
- Improving test case stability

<a name="v0.1.1"></a>
## [v0.1.1] - 2021-06-03
### Changes
- `Read` and `Write` functions are now called `ReadMessage` and `WriteMesage` respectively

<a name="v0.1.0"></a>
## v0.1.0 - 2021-06-03
### Fix
## [v0.1.1] - 2021-06-04
### Fixes
- (LOOP-87,LOOP-88)-fix-message-offsets ([#23](https://github.com/Loophole-Labs/frisbee/issues/23))
- fixing reactor not closing and heartbeat not closing bugs

## [v0.1.0] - 2021-06-03
Initial Release of Frisbee

[Unreleased]: https://github.com/Loophole-Labs/frisbee/compare/v0.1.1...HEAD
[Unreleased]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.1.2...HEAD
[v0.1.2]: https://github.com/Loophole-Labs/frisbee/compare/v0.1.1...v0.1.2
[v0.1.1]: https://github.com/Loophole-Labs/frisbee/compare/v0.1.0...v0.1.1
[v0.1.0]: https://github.com/Loophole-Labs/frisbee/releases/tag/v0.1.0
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Frisbee

![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-brightgreen.svg)

[![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-brightgreen.svg)](https://www.apache.org/licenses/LICENSE-2.0)
[![Build Status](https://loopholelabs.semaphoreci.com/badges/frisbee/branches/master.svg?style=shields&key=0ac9069a-bd8c-4d06-8790-97ba3f70d528)](https://loopholelabs.semaphoreci.com/projects/frisbee)
[![Go Report Card](https://goreportcard.com/badge/github.com/loophole-labs/frisbee)](https://goreportcard.com/report/github.com/loophole-labs/frisbee)
[![go-doc](https://godoc.org/github.com/loophole-labs/frisbee?status.svg)](https://godoc.org/github.com/loophole-labs/frisbee)

Expand Down Expand Up @@ -36,7 +38,7 @@ Everyone interacting in the Frisbee project’s codebases, issue trackers, chat


## Project Managed By:
![https://loopholelabs.io][LOOPHOLELABS]
[![https://loopholelabs.io][LOOPHOLELABS]](https://loopholelabs.io)

[GITREPO]: https://github.com/Loophole-Labs/frisbee
[LOOPHOLELABS]: https://cdn.loopholelabs.io/loopholelabs/LoopholeLabsLogo.svg
Expand Down
6 changes: 3 additions & 3 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func (c *Client) Close() error {

// Write sends a frisbee Message from the client to the server
func (c *Client) Write(message *Message, content *[]byte) error {
return c.conn.Write(message, content)
return c.conn.WriteMessage(message, content)
}

// Raw converts the frisbee client into a normal net.Conn object, and returns it.
Expand All @@ -118,7 +118,7 @@ func (c *Client) reactor() {
if c.closed.Load() {
return
}
incomingMessage, incomingContent, err := c.conn.Read()
incomingMessage, incomingContent, err := c.conn.ReadMessage()
if err != nil {
c.Logger().Error().Msgf(errors.WithContext(err, READCONN).Error())
_ = c.Close()
Expand All @@ -137,7 +137,7 @@ func (c *Client) reactor() {
}

if outgoingMessage != nil && outgoingMessage.ContentLength == uint64(len(outgoingContent)) {
err = c.conn.Write(outgoingMessage, &outgoingContent)
err = c.conn.WriteMessage(outgoingMessage, &outgoingContent)
if err != nil {
c.Logger().Error().Msgf(errors.WithContext(err, WRITECONN).Error())
_ = c.Close()
Expand Down
Loading

0 comments on commit 50e348c

Please sign in to comment.